The Artima Developer Community
Sponsored Link

Weblogs Forum
Physical Dependencies

19 replies on 2 pages. Most recent reply: May 6, 2008 6:37 PM by Neil Thorne

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 19 replies on 2 pages [ « | 1 2 ]
Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: A new meaning of "physical" Posted: Jan 5, 2005 2:43 PM
Reply to this message Reply
Advertisement
>>If they're basic industry practice, a search should have returned a higher hit count. Maybe that answers my question and we aren't giving adequate consideration to our physical dependencies.

If you called these principles what long time industry practitioners have been calling them for the past 20 years instead of making up your own names for them, you'd have a lot better luck communicating your point.

The topic of study is "Configuration Management". It is primarily a management issue (only developers who work for themselves typically get to pick their tools and environments) and it is as old as the cpu.

http://www.cmcrossroads.com/ is a pretty good place to get started. The articles pages should be particularly enlightening for you.

charles medcoff

Posts: 3
Nickname: cmedcoff2
Registered: Jan, 2005

Re: Physical Dependencies Posted: Jan 5, 2005 9:54 PM
Reply to this message Reply
You guys should have a look at Robert Martin's design principles and JDepend.

Have a look at http://www.objectmentor.com/resources/articles/granularity.pdf and http://www.objectmentor.com/resources/articles/stability.pdf. Then Goggle JDepend. It can be incorporated into Ant build scripts. I can help you decide how to partiction logical packages (java namespaces) into physcial packages (java jar files).

Elizabeth

Posts: 1
Nickname: eliz
Registered: Apr, 2005

Re: A new meaning of "physical" Posted: Apr 5, 2005 11:32 AM
Reply to this message Reply
Is this the Todd Blanchard that lived in Paris with his family in 2002/2003? I may have an interesting offer for you if you are interested in returning. elizabeth_vb14@hotmail.com

Alan Parker

Posts: 1
Nickname: krona
Registered: Feb, 2008

Re: Physical Dependencies Posted: Feb 22, 2008 4:40 AM
Reply to this message Reply
The product I work on has probably the worst dependency management you could imagine. Dependencies are not aligned along package boundaries, which means we have duplicate package paths in our jar files. This sometimes leads to classloader problems, for all we know we may still have classes that cannot load in our release builds. Not only that our build dependencies don't really match up with the dependencies we have in IntelliJ, but recently it looks like someone has made every module in IntelliJ depend on every other anyway. There seems to be no understanding whatsover that all this is wrong. For instance our datamodel (shared across applications) is broadly based on the ladder pattern, which is fine. Except the dependencies are split on roughly two levels, all implementations depend on all interfaces. This means you can depend on less abstract interfaces from abstract implementions (which should not be allowed). Quite often some idiot assumes that their code is the only client of certain implementation and just does an unchecked cast to the interface they want to use which then totally breaks another application (which of course they have not tested).

All in all it's a complete mess but it seems we're far to gone to re-architect the whole thing and besides the people in power don't have a clue anyway.

Neil Thorne

Posts: 1
Nickname: neilthorne
Registered: May, 2008

Re: Physical Dependencies Posted: May 6, 2008 6:37 PM
Reply to this message Reply
I have been trawling the web looking for stuff on dependency management/enforcement. I am completely with you in a Java environment I have used a levelized build for the past 8 years after being shown the technique by a colleague.
I'm now using maven2 and I'm finding that over time my jars are getting smaller and smaller as I strive to create reusable component architectures.
One crucial part of this is having a clear macro architecture which ADP gives me. I enforce ADP with maven2 and fine grained jars.
I have met quite a lot of resistance to this technique as some developers want to just package everything as a couple of jars.
I'm specifically having trouble combining ideas in Eric Evans' DDD which recommends a module based approach with ADP. While my colleagues would like one domain model, I'm pushing (successfully thus far) with one logical domain model made up of several "Martin packages"/modules/jars. Each jar represents a reusable piece of the domain model.

eg.
Common - Level 1
Party, Product - Level 2
Quote - Level 3
Purchase - Level 4

This does create challenges especially with a tool like hibernate where the session factory needs to know about all the mapping files for classes.
At the moment we package runtime dependencies (hbm.xmls) with the domain classes. We get around any cyclic dependencies by using spring with regex's to dynamically pick up hbm files on the classpath.
I just wondered what your thoughts were on breaking up a domain model with its persistent mappings etc. in this way.
The whole idea is that Party management in our enterprise should be a reusable component. For me that means that domain, service and implementation layers relating to Party management should live in a separate jars.
I'm also increasingly interested by Spring OSGi as this seems to promote these concepts much further.
I'm just getting a big backlash in my team. Especially when I tell them that a bidirectional relationship in Hibernate is bad if it introduces cyclic dependencies between jars. Say between Party and Quote.
Their answer at the moment is to simply put the classes in the same jar. My preference is for these bidirectional dependencies to be broken with a directed association.
ie. Quote knows about Party but not vice versa. IMO if you want to find all quotes for a given Party you don't ask the Party, you ask a QuoteService - and provide the Party. This way you maintain directed dependencies.
Any thoughts?
thanks and great posts. I watch your comments on Spring OSGi with interest.
Neil

Flat View: This topic has 19 replies on 2 pages [ « | 1  2 ]
Topic: Physical Dependencies Previous Topic   Next Topic Topic: JavaOne 2008, Day Minus One: Non-Profit Networking & Horrible Hotel


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us