473,799 Members | 2,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code documentation.

Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen, and even
for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to get
documentation that is consistent with what MSDN offers and .net-develoepers
are used to.

I guess I have only searched int he wrong places, or with the wrong keywords
:).

Any halpt is apreciated.

regards
//Fredrik Olsson
Jul 22 '05 #1
12 2881
Fredrik Olsson wrote:
Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen,
and even for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to get
documentation that is consistent with what MSDN offers and
.net-develoepers are used to.

I guess I have only searched int he wrong places, or with the wrong
keywords :).


With C# and VB.NET, you can use specially formatted comments (see
http://msdn.microsoft.com/library/de...onComments.asp
for example). The /doc compiler option will cause the compiler to spit out
an XML file containing the documentation. You can then use various tools to
generate the help in whatever format you like. NDoc
(http://ndoc.sourceforge.net/) is very good for example.

Arnaud
MVP - VC
Jul 22 '05 #2
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen,
and even for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to get
documentation that is consistent with what MSDN offers and
.net-develoepers are used to.

I guess I have only searched int he wrong places, or with the wrong
keywords :).


With C# and VB.NET, you can use specially formatted comments (see
http://msdn.microsoft.com/library/de...onComments.asp
for example). The /doc compiler option will cause the compiler to spit out
an XML file containing the documentation. You can then use various tools to
generate the help in whatever format you like. NDoc
(http://ndoc.sourceforge.net/) is very good for example.

I shudder!

Javadoc, doxygen VBDox, headerdoc2html and all others I have looked at works
very similar so doing to hard bulk "porting" of documentation can quite
easily be made with a search and replace, do it with regexp if you want it
99% perfect.

But this is apart from being "different" cluncier, harder to read and
maintain. It is not as if other code documentation tools has net been around.
Having an intermediate xml-format is good, I like it. But making it up to the
user to create the xml-code is horrible, the documentation compiler should do
that!

I'll go around and see if doxygen can be made into generating xml-documents
compatible with wath the C# compiler makes. And if not, well... I'll just
have to add to the project time...

Thanks for the help, even if I did not like the answer :).

regards
/// Fredrik Olsson.
Jul 22 '05 #3
On Fri, 15 Jul 2005 03:47:01 -0700, Fredrik Olsson wrote:
But this is apart from being "different" cluncier, harder to read and
maintain. It is not as if other code documentation tools has net been around.
Having an intermediate xml-format is good, I like it. But making it up to the
user to create the xml-code is horrible, the documentation compiler should do
that!


I think that you have overlooked something here. In the current version of
Visual Studio (2003), there is effectively no automatic comment formatting
for Visual Basic (this will appear in VS 2005). However, in C#, simply
place the cursor above any method or member variable and type 3 slashes
(///). The XML comment are going to be automatically generated for you.
You'll just have to fill the blanks. And if you want to add extra info such
as remarks or description of exceptions thrown, simply type < and
intellisense will pop up to give you all the possible XML comment tags you
can use; choose one and the opening and closing tags will be automatically
generated. Once you've got your XML doc done, launch NDoc, click on a
button, wait a few seconds (or minutes for a big project) and that's your
documentation done in whatever format you want: html pages, HTML help file,
msdn style, javadoc style... Having never used another doumentation
utility, i can't compare, but the VS + NDoc makes me quite happy for this
matter.
Jul 22 '05 #4
"Mehdi" wrote:
On Fri, 15 Jul 2005 03:47:01 -0700, Fredrik Olsson wrote:
But this is apart from being "different" cluncier, harder to read and
maintain. It is not as if other code documentation tools has net been around.
Having an intermediate xml-format is good, I like it. But making it up to the
user to create the xml-code is horrible, the documentation compiler should do
that!


I think that you have overlooked something here. In the current version of
Visual Studio (2003), there is effectively no automatic comment formatting
for Visual Basic (this will appear in VS 2005). However, in C#, simply
place the cursor above any method or member variable and type 3 slashes
(///). The XML comment are going to be automatically generated for you.
You'll just have to fill the blanks.


If I would be developing in .net originally it would be quite good. But I am
not, and I do not write the comments manually. My project is quite huge and
PLATFORM INDEPENDENT. Basically it is a ANSI C library with wrappers for C++,
Objective-C, Perl, COM, Pascal, Java, Delphi, and a few others. And not .net
as well.

For the OOP languages (Objective-C not included) the API looks very similar,
only a few changes to make it more comfortable to "native" programmers and
work around weaknesses or take advantage of strengths. But the basics are
allways there.

Keeping a dozen of documentations up to date is a cumbersome task, and is
manly automated so the documentation is "converted" from one source to the
other with in house tools. It is generally no problem at all, because all
documentation tools use the same general syntax so a more or less simple
replace using "sed" is all that is needed, apart from proof-reading. It saves
A BUNCH OF TIME.

But now the xml tags for c# is not even close... which is sad. Since the
other existing (and decades old) methods really are more human-readable as
well.

But no fear, I am writing a hack with flex and bison to parse the javadoc
comments and generate c# compatible comments.
Jul 22 '05 #5
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen,
and even for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to get
documentation that is consistent with what MSDN offers and
.net-develoepers are used to.

I guess I have only searched int he wrong places, or with the wrong
keywords :).


With C# and VB.NET, you can use specially formatted comments (see
http://msdn.microsoft.com/library/de...onComments.asp
for example). The /doc compiler option will cause the compiler to spit out
an XML file containing the documentation. You can then use various tools to
generate the help in whatever format you like. NDoc
(http://ndoc.sourceforge.net/) is very good for example.

Stumped on NDoc, it requres a HTML Help 2 compiler, and says I should
install VSHIK 2003. Problem, VSHIK 2003 refuses to install without an
installation of Visual Studio 2003.

Is there a way to install just the HRML Help 2 compiler, or another version
of VSHIK that is buried deeper on the MSDN web page?
Jul 22 '05 #6
Fredrik Olsson wrote:
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen,
and even for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to
get
documentation that is consistent with what MSDN offers and
.net-develoepers are used to.

I guess I have only searched int he wrong places, or with the wrong
keywords :).


With C# and VB.NET, you can use specially formatted comments (see
http://msdn.microsoft.com/library/de...onComments.asp
for example). The /doc compiler option will cause the compiler to
spit out
an XML file containing the documentation. You can then use various
tools to
generate the help in whatever format you like. NDoc
(http://ndoc.sourceforge.net/) is very good for example.

Stumped on NDoc, it requres a HTML Help 2 compiler, and says I should
install VSHIK 2003. Problem, VSHIK 2003 refuses to install without an
installation of Visual Studio 2003.

Is there a way to install just the HRML Help 2 compiler, or another
version
of VSHIK that is buried deeper on the MSDN web page?


HTML Help Workshop should be fine for what you want :
http://www.microsoft.com/downloads/d...DisplayLang=en

Arnaud
MVP - VC
Jul 22 '05 #7
Fredrik Olsson wrote:
Keeping a dozen of documentations up to date is a cumbersome task,
and is
manly automated so the documentation is "converted" from one source
to the other with in house tools. It is generally no problem at all,
because all documentation tools use the same general syntax so a more
or less simple replace using "sed" is all that is needed, apart from
proof-reading. It saves
A BUNCH OF TIME.

But now the xml tags for c# is not even close... which is sad. Since
the
other existing (and decades old) methods really are more
human-readable as well.


I don't get your point here : I think C# style comments are very similar to,
say, Doxygen documentation. XML has the advantage of being more easily
parsable because there is an "end" mark for each element, whereas in many
other formats, the "end" of a given element if often marked by a new line, a
new paragraph and the like.

Arnaud
MVP - VC
Jul 22 '05 #8
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
Keeping a dozen of documentations up to date is a cumbersome task,
and is
manly automated so the documentation is "converted" from one source
to the other with in house tools. It is generally no problem at all,
because all documentation tools use the same general syntax so a more
or less simple replace using "sed" is all that is needed, apart from
proof-reading. It saves
A BUNCH OF TIME.

But now the xml tags for c# is not even close... which is sad. Since
the
other existing (and decades old) methods really are more
human-readable as well.


I don't get your point here : I think C# style comments are very similar to,
say, Doxygen documentation. XML has the advantage of being more easily
parsable because there is an "end" mark for each element, whereas in many
other formats, the "end" of a given element if often marked by a new line, a
new paragraph and the like.

Lets See:
/// @param foo amount of bars.
And
/// <param name="foo">amou nt of bars</param>

Not close if you ask me, well searching for the regexp "@param\s(\S*)\ s([\S
]*?)" and replacing with "<param name="\1">\2</param>" works. And was easy
enough to set up as a simply batch script.
The rest was not quite as easy.

I do agree that the c# way is easier to parse for a _program_. But if the
developer where ment to help the compiler parse the code, then we would be
writing code in MSIL assembly instructions. It is not really hard to write a
small hack that parse the documentation tags that has been in use for decades
by virtually every other tool available, and turn it into what c# uses. I did
it for the subset I use in in a couple of hours using Perl.

So I can not really see why the c# compiler can not do it. The old fashioned
way is really Much more readable to a human, xml is not really ment to be
human-readable in the same way.

@[what it is] [what it is called] [what it does]
Clear and simple.

<[what it is] [tag depending on what it is]="[what it is called]">what it
does</[what it is again]>
Easier for an xml-parser yes, for a human to read and write? NO!

And then you have even more stuff that is easy to do in the good old
fashioned way that everyone else uses; paragraphs. Simply have an empty line.
Looks good in your code, looks good in the genereted documentation. And no,
the end-marker is not a new line. The end marker is the next non in-line tag.
Jul 22 '05 #9
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
"Arnaud Debaene" wrote:
Fredrik Olsson wrote:
Hello.

For Java there is javadac, for Obj-C headerdoc2html, for C doxygen,
and even for good old VB 6 there is VBDox.

But I have found no suitable tool for documenting my .net code to
get
documentation that is consistent with what MSDN offers and
.net-develoepers are used to.

I guess I have only searched int he wrong places, or with the wrong
keywords :).

With C# and VB.NET, you can use specially formatted comments (see
http://msdn.microsoft.com/library/de...onComments.asp
for example). The /doc compiler option will cause the compiler to
spit out
an XML file containing the documentation. You can then use various
tools to
generate the help in whatever format you like. NDoc
(http://ndoc.sourceforge.net/) is very good for example.

Stumped on NDoc, it requres a HTML Help 2 compiler, and says I should
install VSHIK 2003. Problem, VSHIK 2003 refuses to install without an
installation of Visual Studio 2003.

Is there a way to install just the HRML Help 2 compiler, or another
version
of VSHIK that is buried deeper on the MSDN web page?


HTML Help Workshop should be fine for what you want :
http://www.microsoft.com/downloads/d...DisplayLang=en


Yes it works, and it is what I use to genereate the documenattion for the
COM-component to use in old Visual Basic 6, VBScript and addins for Office.
But I am afraid it just works, it does not generate documentation with the
look and feel of modern .net documentation as provided by Micrsooft with more
modern Visual Studio. It just looks very unprofessional if the documentation
is not on par with todays standrds.

Or does .net developers not care? Java developers are very picky and can
throw something away if the documentation is not up to their standrds without
even looking further into what your product offers. But then, the Java
developers have quite high standards... sometimes unreasonably so; even
refering to your objects in the wrong tense can make them go berzerk :). But
on the bright side, no developer has ever had trouble picking up any other
developers work...
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2884
by: Brian Beck | last post by:
Hi. I'm having some problems with code based directly on the following httplib documentation code: http://www.zvon.org/other/python/doc21/lib/httplib-examples.html I've included the code and traceback at the end of this post. The odd thing is, using DEPRECATED FUNCTIONS to perform the same function works fine!
6
2179
by: Mario T. Lanza | last post by:
Greetings, I don't know about you guys but on many occasions I've asked myself whether or not someone else has solved a particular programming issue -- whether or not they developed a clever pattern for doing some task quite well. This usually leads me to a search on today's greatest technical tool, The Internet. I indefinitely uncover many potential code snippets, components, etc. and have to weed through them to find the best one...
12
3304
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. Such things happen. The whole subsystem is going through radical changes. I don't really want to say what I think of the code just yet. That would influence the opinions of others, and I really want to know how other people view these things,...
67
4286
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. Unfortunately these ad hominem rhetorts are frequently introduced into purely technical discussions on the feasibility of supporting such functionality in C++. That usually serves to divert the discussion from the technical subject to a discussion of the...
0
1841
by: XSD-optimist | last post by:
I am trying to generate the classes for an XSD schema using the Microsoft XSD Object Code Generator (XSDObjGen). I am having a schema that contains the definition of the following: 1. a complex type 'ExternalDestinationBaseComplexType' 2. abstract element 'ExternalDestinationDefinitionEntry' of type 'ExternalDestinationBaseComplexType' 3. two elements 'SAP' and 'Dir' of type ExternalDestinationBaseComplexType with substitutionGroup set...
25
2137
by: Alvin Bruney | last post by:
C# is great but it does have some short comings. Here, I examine one of them which I definitely think is a shortcoming. Coming from C++, there seems to be no equivalent in C# to separate code cleanly for the user's benefit. Why is this important? Because a user gets to maintain this code, not a machine. C++ exposed us to header files which was a way, among other things, to cleanly separate class implementation from declaration. Why was...
232
13360
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an integer, without any junk thrown in, i.e. it must satisfy the regular expression: ^ *?+ *$ If the...
0
9540
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.