• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Different Navigabilities?

 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


Excerpt from Martin Fowler, UML Distilled, Chapter 4, Associations, Page 55
[..]Note also that the navigabilities are likely to be different between specification and implementation.


Please look at my next post for my queries.
Thanks in advance,
Sandeep
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not very sure what Martin meant by this.I am taking the same Order and Customer example which he uses to explain.
Say in the Specification prespective, the navigability is from Order to Customer only,i.e., Order has the responsibility to tell us, which Customer it is for.
Now at the implementation stage, we realize, it is better that the Customer takes the responsibility to tell us about the Order, since he should also have the authority to update the association, like cancelling the Order, changing the Order, so on and so forth.If we start implementing in this way, the navigability is changed now from Customer to Order.
Is this what Martin meant by change in navigability in the two perspectives?
Thanks in advance,
Sandeep
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Refresh please.
Thanks,
Sandeep
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sandeep,
Go back to page 54. Quote: "...responsibilities do not imply data structure, however. From a specification-level diagram, I can make no assumptions about the data structure of the classes...The diagram indicates only the interface--nothing more."
Put in another way: The contract (specification) is for Order to know the Customer. However, when you implement, there may be some constraints--perhaps due to the language you use or platform, whatever--that make it necessary to have Order point to Customer and Customer point to Order. The contract remains the same though since no new responsibilities have been identified.
If, however, during the course of implementation, you realize that a new responsibility has been identified, that new responsibility should be reflected in the specification-level diagram.
Junilu
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by JUNILU LACAR:
If, however, during the course of implementation, you realize that a new responsibility has been identified, that new responsibility should be reflected in the specification-level diagram.


If the above happens, does it mean we reflect the change in the implementation-level Class Diagram OR specification-level Class Diagram?
Am puzzled, since Fowler says "Note also that the navigabilities are likely to be different between specification and implementation."
This means you may have Class Diagrams in the implementation-level not in sync with specification-level.If the navigabilities is changed/added in the implementation-level, it means that new responsibilities have been discovered and also that the specification-level contract is broken.So what happens to the responsibilities identified in the original specification contract?
I believe it should be the navigabilities should be same between specification and implementation.
Thanks,
Sandeep
[This message has been edited by Desai Sandeep (edited May 29, 2001).]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic