One of the funny things about anti-patterns is that they are obvious in the name alone.  We might not know what it is but everyone avoids a jumble.  There is no technical knowledge required to judge this is not a good idea for a solution architecture.  In this episode, we review the jumble anti-pattern, what it looks like, and how to avoid it.

The Jumble Defined

The key to the jumble anti-pattern is horizontal and vertical elements of the design.  We want to keep those separate much like in Ghostbusters, do not cross the streams.  There should be a clear usage for a component either in the horizontal or vertical sense.  That allows us to use them properly and within the proper stream or flow of data.

Think of a series of plumbing pipes.  Different liquids or temperatures flow depending on the pipe.  Our horizontal and vertical pieces of the solution are similar.  There might be very different items in each.  Likewise, the connections from one to the other can quickly become confusing and turn into a jumble.

The Anti-Pattern In Action

Almost every solution has general components and those specific to the problem.  While we can keep all components as stand-alone to the particular solution, it is better to utilize general components as well.  We see this creep in when components have to pass around a lot of data.  A need to change the source code of a framework or library also points to a jumble.  The mixing of vertical and horizontal components often leads to “breaking” well-encapsulated code.

 

Avoiding The Anti-Pattern

The first step in avoiding this anti-pattern is designing your solution with an eye to problem-specific components and general pieces.  Next, do not intermingle those components.  They have different inputs, outputs, and purposes.  Thus, we need to keep our design focused on the task at hand and not allow the architecture to sprawl into areas that are not needed.

Rob Broadhead

Rob is a founder of, and frequent contributor to, Develpreneur. This includes the Building Better Developers podcast. He is also a lifetime learner as a developer, designer, and manager of software solutions. Rob is the founder of RB Consulting and has managed to author a book about his family experiences and a few about becoming a better developer. In his free time, he stays busy raising five children (although they have grown into adults). When he has a chance to breathe, he is on the ice playing hockey to relax or working on his ballroom dance skills.

Leave a Reply