I’ve been recently involved in design as many of the teams I’ve been working with are starting newer projects. As we get on to design we had a lot of mention of using design patterns especially GOF(Gang Of Four).
One of the common problems I’ve faced using GOF is that it really does not fit every scenario especially when it comes to object modeling. It also does not tell me which object should do what all functions/responsibilities. It is also easy for developers with relatively lesser experience to forget about basic design principles like Low Coupling, High Cohesion, Modular Design while concentrating too much on design patterns.
Few years back I had a chance to work with an Architect, who trained us on some very basic principles of design and code. One such concept I learned was Information Expert Pattern.
It has since then served as a guiding principle, whenever i get in to design. It states that responsibility should be assigned to the information expert—the class that has all the necessary information.
Information expert not only enables you to keep the design simple, it also makes it a lot more easier to write code for reuse if followed religiously throughout the design.
The details of this can be found in the book Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development by Craig Larman.
Some other references :
If you have used Information Expert before. Let me know your experiences.