This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Deep or Shallow Prerequisites
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
I've had a couple of people ask about this. The NewPrerequisiteEngine (found in the Open Repository) will compute prerequisites "deeply" when it runs, rather than shallowly.
For example, let's say you have three packages: Aardvarks, Zoos, Animals. Aardvarks needs Animals. Zoos needs both Aardvarks and Animals. In a "shallow" model, it would be nice to simply specify that Zoos needs Aardvarks, though it needs Animals too, that will be taken care of indirectly by the Aardvarks need which will in turn pull in the Animals. In the "deep" model, each of the dependencies is noted, even if the graph creates some redundancy.
The "shallow" model is probably appealing, because it means shorter prerequiste lists.
To me though, the "deep" model is better. Consider the scenario where due to some refactoring, Aardvarks no longer needs Animals, but Zoos still does. If the "shallow" approach is used, you've now got a problem. This is bad encapsulation. A change in Aardvarks caused the prerequisite nature of Zoos to change. Using the "deep" approach better encapsulates the needs of a package, and isolates/protects them from changes in other packages.
Oh yeah, there's another reason. Automating the "deep" approach is a simpler approach than the indirect "shallow" approach.