Most OO systems claim to be modular but very few really are. Normally OO systems have cycles between they modules. Even if there are no cycles the dependencies between the so called modules are chaotic and inflexible. A typical result is that developers can't instantiate a small set of classes for unit testing without having the rest of the system.
PicoContainer is an open-source project that provides a IoC-Container (IoC = Inversion of Control) that is very useful for defining and managing the dependencies between modules.
I collegue asked me once when I would PicoContainer into a project:
- Right from the beginning?
- Even for prototyping?
- When the system exceeds a certain size?
I think that projects should use PicoContainer right from the beginning and even for prototypes. Even for very small prototypes PicoContainer pays off measured in Lines of Code and it adds very small overhead to the project.
Adding PicoContainer later to a project results in refactoring and will therefore often not done.
Post bewerten
Keine Kommentare:
Kommentar veröffentlichen