Duffblog has moved to a new home. Update your links!

Calendar

January 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Dec   Feb

Brian Duff's Old Weblog

 Friday, January 23, 2004


Java Class Modeler: Actually Quite Useful :)

I've been messing around with JDeveloper's Java Class Modeler the last couple of days while designing a new API for the compare tool and local / remote history in JDeveloper 10.0.3. I've always been a bit of a UML-sceptic, favoring a more agile approach to development rather than doing large amounts of upfront design.

Click for larger version

Having said that, the UML team have put an enormous amount of work this release into what's internally referred to as the "kick ass java modeler mission". They've done a lot of work to make the java class modeler a genuinely useful tool for Java developers that happens to use UML rather than just being a "pure" UML analysis tool. (Of course, if you want a pure UML tool, you can use JDeveloper's UML Class Diagram instead :) ).

Some of the features I really like in the JCM:

  • The surface edit support is much more intuitive now: you can change class names, method names etc on the diagram surface easily and immediately see the effect on your overall model.
  • When you create an association, it automatically adds a member variable to the code. If it's a one-to-many relationship, it adds an array member.
  • If you don't like the generated array member for one-to-many associations, you can just edit the code and change it to a collection type (e.g. List). The use of special javadoc tags keeps the information about the relationship on the diagram.
  • Associations with elbows now work a lot better when you move the shapes at either end around. They "snap" to straight lines with elbows. This makes your diagram neater - diagonal lines crossing all over the place is just a mess.


12:27:09 PM     comment []


weblog   |   articles
© Copyright 2004 Brian Duff. Last Updated 1/24/2004; 3:05:36 PM. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.