knowledge.lapasa.net

Greater Toronto Area Flash Platform Developer Blog

Violet UML Editor excellent for quick diagramming

TAGS: None

I was searching for free UML diagraming tools/plugins for Eclipse and I tried out

ArgoUML
http://argouml.tigris.org/
- It’s alright
- Does the job

Eclipse UML2 with no UML2 tools meaning no GUI
http://www.eclipse.org/modeling/mdt/
- Too hardcore for me
- Zero boxes and lines
- Just all tag markup

Papyrus for UML
http://www.papyrusuml.org/
- Very cumbersome to use
- Did not like the # of clicks it took to change multiplicity of an association

Violet UML Editor
http://alexdp.free.fr/violetumleditor/
- Simplistic interface
- Mouse-wheel driven element selection makes for quick drawing
- Can run as a part of eclipse or a stand-alone.
- Can print pretty good (if you stick to the default Blue Vista theme)

Violet UML was a pleasure to use because of how quickly I was able to apply stripped down fundamental UML. If I were to go any more basic, I would be on a whiteboard, markers, and a digital camera.

Two constructive suggestions I would have for the awesome developers who put this together is:

Space Bar Use:
When the space bar is down, the cursor changes into a hand. The user may then click and drag on the diagram which will move the visible area to another part of the diagram. This saves a lot of time by not moving the mouse to the scroll bars on the bottom and the right.

Ctrl + Wheel Up and Down:
When Ctrl key is pressed, if the user scrolls up and down, it will either zoom in or out. Pressing on the wheel button would restore to a view that can view all 100% of the diagram.

Aside from these, Violet UML is a solid UML editor that I highly recommend.

Try it out without having to install it.
http://alexdp.free.fr/violetumleditor/demo/violet.jnlp

Value Objects with Getters/Setter Interface

TAGS: None

Recently, I’ve built the client side of a J2EE Transfer Object pattern implementation and it composes a number of value objects. I was going to shape the VO’s like in Darron Schall’s Book VO used in his “Convert Generic Objects into Class Instances” article (good read I might add). The VO consists of an object with public attributes and nothing else.

public class Book
{
public var title:String;
public var pageCount:int;
public var publishedDate:Date;
public var inLibrary:Boolean;

// Just for kicks...
public var random:*;
} // end class

I was contemplating whether to use getter/setter methods using the get & set keywords. It would allow me to parse information that was coming in as Strings but return it in the type it was needed.

A little bit of net research led me to this nice article that using get methods and set methods can add more flexibility in the future.

1) Get methods can return a default value if it’s undefined/null

2) Get methods can be used to trigger lazy instantiation: Why create instantiate the object of a linked attribute at the time of the VO’s initialization when you can do it at the time you need?

3) Set methods can perform validation: This was the main reason why I considered getter/setters with VO’s.

4) You can have multiple getters for the same private attribute: Very cool, didn’t realize how handy this could be.

Singleton vs. Static

TAGS: None

Some links I pulled up to learn more about the topic….

http://www.artima.com/forums/flat.jsp?forum=17&thread=4795
http://www.bitchwhocodes.com/archives/2006/04/singleton_vs_st.html
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=012004

© 2009 knowledge.lapasa.net. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.