You suggest that having less commonly used code in the main Library would make it larger and thus more difficult for newbies to learn. I agree with that general principle.
However, since a great deal of the code is commonly used by all the applications, I simply made the leap of reasoning that they would have to learn everything anyway.
But I will go back and closely examine the library and challenge my assumption to make sure that is true. In fact, I should include one of my colleagues in the process and see what their reaction is. Since I designed most of the classes in the shared code, I'm the least suitable person to judge how it looks to a newbie.
You've also described the risk in which libraries might use database tables would require every application to have tables that it doesn't use.
Can you explain this more fully?
It sounds like you're speaking from experience and I would like to understand the detailed scenario.
I was trying to imagine having some data access objects for example, which refer to several tables. But just because this library is referenced by an application, unless the application actually calls the data access objects which depend upon the tables, tables need not be created. I would expect my unit tests to uncover this immediately, during the earliest stages of the development process.
And if the application needs the data access object which needs the table, then I would simply create only those tables needed by the application. This seems appropriate.
But of course, I believe your deeper point was that we don't want to encumber applications which use our library with dependencies which are irrelevant to the application. And I admit that these external dependencies (like database tables) are some of the most annoying things to deal with. So as I consider this principle, I think about all of the third-party UI libraries and external API interfaces we depend on. I especially think about shared code which requires the special installation of software components. We have about five or six of these sorts of products. And while we expect our developers to have all of the products installed on their development machines so that they can support all of the applications and code, I can easily imagine scenarios in which we would like to test a small portion of the library on a machine without having to install a number of completely unrelated third party packages simply to satisfy the compile commands of a bloated library.
Anyway enough of this. The more I think about it, the more I realize the need to establish a rational package design scheme as soon as possible.
-----------
Regarding the book "Fundamentals of Object-Oriented Design in UML" by Meilior Page-Jones" :
He does have rules regarding how to use the layers. He agrees that packages in one layer should depend down. However I did not find any further rules on package design per-se. Most of his book is on class design.
Most of your criticisms of his model compared with the ARM are that the ARM is more specific, and thus is a stronger guide to better package factoring. In all fairness to Page-Jone's model, I just listed the top four layers -- but as you might imagine there is more to it than I can cover in a single email. Sometime over the next few weeks, when I have the time, I'll try to give you a more thoughtful reply to some of your specific concerns. But I will say off the top of my head that I like your separation of the user interface layer from the application layer.
Given your deep interest in package design and its relationship to software layers, I'm sure you would enjoy it tremendously. I got my copy on Amazon at a reduced price by buying a used copy. It must've been used in several courses as there are plenty of used copies available.
--------
So far, I have only found practical rules about software layers in your paper on The Architectural Reference Model (ARM) and Robert C. Martin's chapter on "Principles of Package Design" in his book "agile software development -- principles, patterns, and practices".
If you know of any other published writings on this topic, I would be grateful to have references.
Thanks again for your good ideas.
I may write again as I try to apply the ARM to my own project.
I have made a complete copy of one of our many applications along with all of the shared code and placed it in a sandbox where I can conduct all kinds of fun experiments with layering and package design.
I would love to attend your workshop, but I don't think my employer can afford to send me to Europe or afford to have you come here to the United States. However, if you ever do get an opportunity to present that or similar talks in the United States, please let me know and I will see whether I could make arrangements to attend.
Respectfully,
David Kreth Allen
Minneapolis, MN
www.ratio.co.uk/markcollinscope.html
+44 (0)20 8579 7900 or :+44 (0)777 163 6882
Author: "Agile Development with Iconix Process"
Editor: www.ratio.co.uk/objectiveview.html
---------------------------------------------------------------------------
recursion is - of course - a form of magic
Thanks for the thoughtful response, Mark.
Here are my reactions to your comments on the notion of having a single library for all shared code
First, we agree that such an arrangement is very much NOT an ideal design,
but only a transitional device to
allow me to refactor more readily while we consider a more ideal design.
You suggest that having less commonly used code in the main Library would make it larger and thus more difficult for newbies to learn. I agree with that general principle.
However, since a great deal of the code is commonly used by all the applications, I simply made the leap of reasoning that they would have to learn everything anyway.
But I will go back and closely examine the library and challenge my assumption to make sure that is true. In fact, I should include one of my colleagues in the process and see what their reaction is. Since I designed most of the classes in the shared code, I'm the least suitable person to judge how it looks to a newbie.
You've also described the risk in which libraries might use database tables would require every application to have tables that it doesn't use.
Can you explain this more fully?
It sounds like you're speaking from experience and I would like to understand the detailed scenario.
I was trying to imagine having some data access objects for example, which refer to several tables. But just because this library is referenced by an application, unless the application actually calls the data access objects which depend upon the tables, tables need not be created. I would expect my unit tests to uncover this immediately, during the earliest stages of the development process.
But of course, I believe your deeper point was that we don't want to encumber applications which use our library with dependencies which are irrelevant to the application. And I admit that these external dependencies (like database tables) are some of the most annoying things to deal with. So as I consider this principle, I think about all of the third-party UI libraries and external API interfaces we depend on. I especially think about shared code which requires the special installation of software components. We have about five or six of these sorts of products. And while we expect our developers to have all of the products installed on their development machines so that they can support all of the applications and code, I can easily imagine scenarios in which we would like to test a small portion of the library on a machine without having to install a number of completely unrelated third party packages simply to satisfy the compile commands of a bloated library.
Anyway enough of this. The more I think about it, the more I realize the need to establish a rational package design scheme as soon as possible.
-----------
Regarding the book "Fundamentals of Object-Oriented Design in UML" by Meilior Page-Jones" :
He does have rules regarding how to use the layers. He agrees that packages in one layer should depend down. However I did not find any further rules on package design per-se. Most of his book is on class design.
Most of your criticisms of his model compared with the ARM are that the ARM is more specific, and thus is a stronger guide to better package factoring. In all fairness to Page-Jone's model, I just listed the top four layers -- but as you might imagine there is more to it than I can cover in a single email. Sometime over the next few weeks, when I have the time, I'll try to give you a more thoughtful reply to some of your specific concerns. But I will say off the top of my head that I like your separation of the user interface layer from the application layer.
Given your deep interest in package design and its relationship to software layers, I'm sure you would enjoy it tremendously. I got my copy on Amazon at a reduced price by buying a used copy. It must've been used in several courses as there are plenty of used copies available.
If you know of any other published writings on this topic, I would be grateful to have references.
Thanks again for your good ideas.
I may write again as I try to apply the ARM to my own project.
I have made a complete copy of one of our many applications along with all of the shared code and placed it in a sandbox where I can conduct all kinds of fun experiments with layering and package design.
I would love to attend your workshop, but I don't think my employer can afford to send me to Europe or afford to have you come here to the United States. However, if you ever do get an opportunity to present that or similar talks in the United States, please let me know and I will see whether I could make arrangements to attend.
> This is a very good book taken as whole and I recommend it. Chapter 11 is a little confusing I think, and needs further explanation - it could be seen to contradict the ARM... which of course can't be right... :-).That may be one of my confusions.I notice his figure 11-2 shows lower layers depending on higher layers.What is a poor little programmer like me to do when two "experts" have opposite opinions <smile>.I guess I'll have to go back to the core principles (minimize duplication, minimize needless coupling, increase package cohesion) we all agree on and look at my unique situation.