The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Deep or Shallow Prerequisites

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Deep or Shallow Prerequisites Posted: Sep 28, 2004 11:25 PM
Reply to this message Reply

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
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement
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.

Read: Deep or Shallow Prerequisites

Topic: Logging is evil Previous Topic   Next Topic Topic: Using Smalltalk

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use