Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Documenting servlets

 
Wilson Gordon
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Javadoc is for java files. As servlets are basically java files use it for them as well.
 
Wilson Gordon
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well yes we do document servlets and do include them in the UML wherever necessary.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic