SOLID Principles

Today was nPlus1‘s sixth ever architecture summit.  This summit was held in Indianapolis, IN and addressed the SOLID principles.  The presenters were Mike Wood and Dan Rigsby.

The SOLID principles were originally defined by Robert Martin as a set of guidelines for writing better code.  As with any guidelines, these are not steadfast rules that must always be followed but proper application of these principles can make code more maintainable, flexible, and readable.  There is a plethora of information about these principles so rather than going into detail about each of them this article just includes a brief description of each one.

One argument against using some of these principles is that following them will result in more code.  Some may argue that having more classes and interfaces will ultimately make the system too difficult to understand.  The counterpoint to these arguments is that there are no more moving parts in a system with many small pieces than a system with a few large ones.  That is, if it’s doing the same thing it should be no more or less difficult to understand.  The trade-off to more code is a system that is more accepting of change when (not if) it comes.

Additional Resources

Advertisements