Friday, December 16, 2005

Re; Free UML Tool?

There is an experimental one being developed at MIT:

http://relo.csail.mit.edu/

Singleton design pattern

Mohnish & I had a small discussion recently about Singleton vs static method only class.

A few advantages of Singleton we came up with were..

Singletons can be subclassed. And preferably used with Factories or Registries.

Another subtle difference was usage. When you have a singleton, you get back a class instance on which you then perform operations. Like..

Singleton singleton = Singleton.getInstance();
singleton.doSomething();
singleton.doSomethingMore();

Compare this to ..

Math.cos(..);
Math.round(..);

The Singleton is just more correct because it allows to think in terms of a type and its behaviour and limits the instances. The static method form does not exhibit the same level of coherent behaviour. It's not the most cleanest distinction but I guess you know what I mean.

I was in the mood to read more on this and stumbled on an article on Javaworld - Simply Singleton. Definitely worth a read.


...which reminded me of a basic feature of Singletons we missed - controlled instance creation

Thursday, December 15, 2005

RE: Free UML Tool?

Revo, Most of the reverse engineering software's that can be found for
UML are not freely available. There's EclipseUML @
http://www.omondo.com/ that you can try. The free version does not have
reverse engineering capabilities and the Enterprise Edition has a 30-day
evaluation limit.

There are others too, but more or less the story stays the same, go to -
http://eclipse-plugins.2y.net/eclipse/plugins.jsp?category=UML

If you do decide to evaluate EclipseUML (which is a plug-in for Eclipse)
make sure you have the dependencies of the EMF, UML and GEF packages
right.

Dinesh.

Sunday, December 11, 2005

Free UML Tool?

Do any of you use any UML tools? I was looking for a tool which would convert existing code (again Java) to a UML Diagram - Class and sequence diagrams.

Preferably the tool should be light on resources.