aspose file tools*
The moose likes Product and Other Certifications and the fly likes Q about UML Distilled: transient relationship? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Q about UML Distilled: transient relationship?" Watch "Q about UML Distilled: transient relationship?" New topic
Author

Q about UML Distilled: transient relationship?

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi,

Martin Fowler says the following:

Whether a property is implemented as a field or as calculated value, it represents something an object can always provide. You shouldn�t use a property to model a transient relationship, such as an object that is passed as a parameter during a method call and used only within the confiness of that interaction.


I can�t really understand what he wants to say in the second sentence: what is the problem with transient relationships?

Cheers,

Gian Franco


"Eppur si muove!"
Edwin Keeton
Ranch Hand

Joined: Jul 10, 2002
Posts: 214

I don't think he's saying there's anything bad about transient relationships. What he means is you don't try to model them (transient relationships) with a property. (He gives the example of an object parameter to a method.) It might look something like this:



Hope this helps.

Ed


SCJP, SCWCD
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
A class diagram is a static view on the interfaces, classes and the relationships among them (association, implementation and inheritance).
If you put transient relationships in the model, reader of model is overwhelmed with information.
Also transient stuff is inherently dynamic. An instance member is allways "there" as long as the class does exist, though it might be null. A transient variable has a much shorter life-cycle.

Transient stuff gets focus in types of uml models which show dynamic behaviour like interaction diagrams.
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Thank you, Ed and Axel, the combination
of your replies makes it all clear

Cheers,

Gian Franco Casula
 
Don't get me started about those stupid light bulbs.
 
subject: Q about UML Distilled: transient relationship?