Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

cycles in dependency structure

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends
Can somebody explain the following from Martin Fowler page 112, last 2 lines.


Putting abstract classes in supertype package is good way of breaking cycles in the dependency structure


what are these cycles being referred ?
Thanks
Ram Kondawar
[This message has been edited by Ram Kondawar (edited June 12, 2001).]
[This message has been edited by Ram Kondawar (edited June 12, 2001).]
[This message has been edited by Ram Kondawar (edited June 12, 2001).]
 
Ram Kondawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry for the font size, it was a typo error
 
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can edit your posting by pressing the button.
 
Ram Kondawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Johannes . I did edit the message.
Ram Kondawar
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is based on Indirection Pattern.
By keeping supertype abstract, the class which sends the message to the supertype doesn't know about the type of object (subtype) it is refering to until runtime.Since, the sender class is not directly coupled with the subtype, the temporary visibility (local or parameter) of the subtype is broken by indirection.
Since dependency relates to above types of visibility,we have reduced the dependency cycles between classes by allowing the abstract supertype to talk to its subtype.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited June 12, 2001).]
 
Ram Kondawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sandeep
This has definitely cleared my doubt.Till I had read your message , I was wondering how the dependency of subtype on supertype reduces by putting abstract supertype in separate package.
Thanks
Ram
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic