• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Q about UML Distilled: transient relationship?

 
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 214
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Ed and Axel, the combination
of your replies makes it all clear

Cheers,

Gian Franco Casula
 
reply
    Bookmark Topic Watch Topic
  • New Topic