Saturday, July 20, 2013

The God element

In mid March of 2013 the God particle was confirmed to exist to the joy of many scientists. In software architecture, the God element has been around for years, and in contrast to the particle, the element is fairly easy to spot.

The God element1 is an element with a lot of connections to other objects in the system, the element is in the center of attention and is often called “manager”.

The problem with this design is that the manager is responsible for all the functionality, the manager is the entire system and the other objects merely acts as e.g. data providers. Another problem is that it may lead to a complex system that is difficult to maintain, the manager does too much. Performance, reliability and scalability are key quality attributes that are effected by this type of design.

The solution is to spread out the responsibilities among the elements. Software Systems Architecture1 gives a guideline:
"if you find more than 50% of your system's responsibilities concentrated in less than 25% of your functional elements, you may be heading toward a number of large elements"

1 Nick Rozanski and Eoin Woods, Software System Architecture: Working with Stakeholders Using Viewpoints and Perspectives, Second edition

No comments:

Post a Comment