Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there some good and modern alternatives to Javadoc? [closed]

Let's face it: You don't need to be a designer to see that default Javadoc looks ugly.

There are some resources on the web which offer re-styled Javadoc. But the default behaviour represents the product and should be as reasonably good-looking.

Another problem is the fact that the usability of Javadoc is not up-to-date compared to other similar resources.

Especially huge projects are hard to navigate using Firefox's quick search.

Practical question:
Are there any standalone (desktop) applications which are able to browse existing Javadoc in a more usable way than a browser would?
I'm thinking about something like Mono's documentation browser.

Theoretical question:
Does anyone know, if there some plans to evolve Javadoc, in a somehow-standardized way?
EDIT: A useful link to Sun' wiki on this topic.

like image 765
ivan_ivanovich_ivanoff Avatar asked Jun 22 '09 10:06

ivan_ivanovich_ivanoff


People also ask

Is Javadoc still used?

Javadoc is pretty much the accepted standard for documenting java code.

Should private methods have Javadoc?

Nope, you shouldn't write javadoc for private methods. End users don't have access to private fields or methods so there really isn't a point in providing javadoc for them. Private fields and methods are only meant for the developer.

Should I implement Javadoc or interface?

Sjoerd correctly says that both interface and implementation should have JavaDoc. The interface JavaDoc should define the contract of the method - what the method should do, what inputs it takes, what values it should return, and what it should do in cases of error.


2 Answers

I have created a Markdown (java) Doclet which will take source comments in Markdown formatted text and create the same HTML Javadocs.

The new doclet also does some restyling on the text, but the HTML generated is not changed at this stage.

That goes some way to address the HTML-in-java-commenting issues which is probably the biggest usability problem with current Javadoc.

like image 170
Richard Nichols Avatar answered Sep 20 '22 07:09

Richard Nichols


I don't think that the concepts of Javadoc are outdated. As far as i can see, these concepts are rooted years ago in a product named doxygen, which is still available for other languages (i.e. Objective-C where it is heavily used). Even this has it's predecessors - have a look at the programming environment used by Donald Knuth to create TeX (Literate programming).

Nevertheless it is a intriguing idea to have a single source for program code and documentation.

Besides of that, the presentation of the documentation can be customized to your special needs using a plug-in system supported by the JavaDoc tool. You might provide a plug-in (as we do) that publishes directly into a database which is directly accessible via web. Using collaborations anyone can provide additional comments or clarifications to the documentation that might find their way back into the original source.

like image 21
Ralf Edmund Avatar answered Sep 21 '22 07:09

Ralf Edmund