Skip to main content

Levels and Dimensions

Posted by daniel on February 24, 2004 at 5:29 AM PST

Uncle Bob notes that the Dependency Inversion Principle and the Domain Driven Design concept of Layers seem to contradict each other until you introduce another dimension.

We link to his blog entry Layers, Levels, and DIP in
Also in Java Today
. Bob Martin begins by describing Eric Evans Layers from Domain Driven Design:


Bob then reports that "DDD also says that 'higher' layers should depend on 'lower' layers. Indeed, he stresses that when lower layers need to communicate upwards they should use callbacks or Observers. DDD is not the only source for this concept; it's pretty universal." But what is meant by higher and lower?

Martin explains that the Dependency Inversion Principle essentially means " that high level policy should not depend on low level detail. Yet the layering principle says that high level layers should depend upon low level layers. Clearly there is a mismatch here. Indeed, in the diagram above *everything* eventually depends upon the infrastructure; which is the the lowest level most detailed module of all. Could we be talking about two different dimensions of level? Could it be that a module is high level in one dimension and low level in another? What are these two dimensions?"

Bob says that perhaps the way to look at this is that infrastructure is orthogonal to the rest of the application. Martin says that that is the lesson of Gregor Kiczales' Aspect Oriented Programming and Steve Mellor's translation.

In our other linked article, John Zukowski details all of your options in Beyond the basics of JOptionPane . What makes the JOptionPane tricky to use is the same class is used to specify Message Dialogs, Confirm Dialogs, Input Dialogs, and Option Dialogs. You determine which type is created with one of seven constructors or with factory methods. There are more than two dozen constants defined in the class used to specify some of the options (such as OK_CANCEL_OPTION) and return values (such as CANCEL_OPTION). John's walk through the JavaDocs should make everything clear.

In today's Projects and Communities The Java Games community homepage featured developer, SecurePlay is an "anti-cheating library for network games using Java technology."

Java Communications highlights the Japanese JAIN site with information about JAIN Technology, APIs, and JAIN SLEE including a pdf download of slides from a JAIN SLEE workshop.

In today's News Headlines

Registered users can submit news items for the href=""> News Page using
our news submission
. All submissions go through an editorial review by news director
Steve Mallet before being posted to the site. You can also subscribe to
News RSS feed

Current and upcoming
Java Events

Registered users can submit event listings for the href=""> Events Page using our href=""> events submission
form. All submissions go through an editorial review before being
posted to the site.

Archives and Subscriptions: This blog is delivered weekdays as the
Today RSS feed
. All members can subscribe to the email
updates for the site at the href="">
java-net Mailing Lists page. You must be logged in to subscribe
the javanet_Daily and javanet_Weekly lists. Also, once this page
is no longer featured as the front page of
it will be archived along with other past issues in the href=""> Archive.