Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Q about UML Distilled: transient relationship?

 
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Thank you, Ed and Axel, the combination
of your replies makes it all clear

Cheers,

Gian Franco Casula
 
We don't have time to be charming! Quick, read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!