aspose file tools*
The moose likes Servlets and the fly likes Documenting servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Documenting servlets" Watch "Documenting servlets" New topic
Author

Documenting servlets

Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
I plan to generate Javadoc for the project I am doing, which consists of some 30 model classes and a dozen servlets. I haven't used Javadoc before.

My question is should Javadoc be generated for the servlet classes too?

Thanks.
[ May 17, 2007: Message edited by: Wilson Gordon ]
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Yes. Javadoc is for java files. As servlets are basically java files use it for them as well.
Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
Thanks for the reply.

Lots of my servlets don't have class attributes though and implement either doGet and doPost. Some have a couple methods.

What are some other things I should document for the servlets besides those doGet/dPost and other methods?
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
How would you had done this had it been a normal class and implemented an interface and just provided the implementation of the required methods and didn't introduce any new method.

Just treat servlets as normal java files and do what you had done with a normal java file.

Basically if you are implementing an interface the interface should provide the information what it is supposed to do and the implementing class should refer to the interface's javadoc.
Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
Thanks. Makes sense.

I supposed you do the same for sevlet classes when it comes to UML too? Currently in my UML I have class diagrams for all the model classes, except the servlet classes and a few utility classes.
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Well yes we do document servlets and do include them in the UML wherever necessary.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Documenting servlets