Dan Perl
Posts: 28
Nickname: nanov
Registered: Sep, 2004
|
|
Re: A Layering Challenge
|
Posted: Feb 7, 2005 10:28 PM
|
|
> And if all applications should be > modular, and we can agree that dependencies should be > acyclic between modules, then layer your modules.
I am not convinced that dependencies have to be acyclic between modules. That is true of packages (deployment units), as in the Acyclic Dependencies Principle (http://c2.com/cgi/wiki?AcyclicDependenciesPrinciple), but not necessarily modules in general. See for instance the "Counter Example Of Acyclic Dependencies Principle": http://c2.com/cgi/wiki?CounterExampleOfAcyclicDependenciesPrinciple
> Regardless, the point of the original post is that if you > have a layered application, then you should be able to > separate your layers into separate deployable units with > acyclic dependencies. If you can't, the application isn't > layered. Agreed?
Okay, layers do not have cyclic dependencies and modules that do (modules in the general sense, not the HiveMind sense) are not really layers. And because layers are cyclically independent then they can also be packaged and deployed separately. They don't have to but they can. I do agree with that.
But I think you are inferring much more in your original posting. It's not just "if you cannot deploy the layers separately, then you shouldn't call your application layered". You're also saying "and if your application is not layered, then its architecture is bad". And I don't agree with that. Layers are good but not every application has to or can be layered and applications can still be well architected without layering.
Please qualify your statements and do not justify them with just "we all agree on A, therefore you must agree on B". We haven't agreed on A and you have to justify A before using it as an argument for B. Why is cyclic dependency wrong inside a package? If two classes are cyclically dependent they cannot be deployed separately. So what? They can still be highly cohesive and strongly decoupled. Do you really need them deployed separately? The same can be extrapolated for application architectures. So you can still have a good architecture even if it's not layered and even if it cannot be broken into smaller packages. All the benefits you listed in the original posting are benefits of modular architectures in general and not just layered architectures.
I guess that this argument is turning into the ADP argument (see the links above) and obviously people disagree there too. So we will probably just have to agree to disagree.
|
|