BT

Architecture, Technology and the Lava Layer Anti-Pattern

| by Jan Stenberg Follow 34 Followers on Jan 12, 2015. Estimated reading time: 2 minutes |

Successive changes to architecture and technology throughout the lifetime of an application can lead to a fragile and fragmented codebase that is hard to understand and maintain, an anti-pattern named Lava Flow or Lava Layer, Mike Hadlow explains sharing his experiences of how and why this anti-pattern sometimes emerge.

Mike, a freelance software engineer, has often experienced this anti-pattern in enterprise software, especially in large, mission critical and long-lived software in connection with organisations having high staff turn-over. He has also found that it often surface from a desire to improve the software. To illustrate how this anti-pattern arises he has created a fictional story about an application, based on his experiences from numerous projects.

Development of the new application was started when the .NET platform was relatively new and a decision was taken to build a web based application on the ASP.NET platform and to adapt to e.g. Microsoft design guidelines by building the Data Access Layer (DAL) based on the ADO.NET RecordSet and exposing Datasets directly to the UI layer.

The application was released and after some time in use new requirements evolved and a budget was assigned for a new version. With a new lead developer critical to the DAL implementation and usage of Datasets a new design was decided. For the new parts of the system an object-oriented model approach was chosen with classes representing tables and code generated from the relational schema.

After a few years, with new developers working on the application not really understanding the two different models, one using Datasets and the other a type of Active Record pattern, yet another design was decided for the third version, this time using a domain model and an Object-Relational Mapper, ORM. A suggestion for a complete rewrite was rejected, resulting in an application with three different data access solutions and different implementations of the same type of function depending on during which generation it was implemented.

Although this was a fictional project, Mike often sees the same problem in real projects. In projects without a consistent architectural strategy and an unclear design philosophy, thus allowing for new design and technology choices, these new choices seldom completely replaces the old ones resulting in a system with archaeological layers revealing its history and the different technological fashions used. He believes that developers act in good faith wanting to improve a system but are lacking the resources needed for a rewrite, instead ending up with systems implementing the Lava Flow anti-pattern.

Mikes advice is to carefully evaluate any significant architectural or technological changes in an existing application, sometimes it may be better to favour consistent technology even though it might be considered old fashioned or legacy.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Architecture, Technology and the Lava Layer Anti-Pattern by Venugopal Balu

Sometimes organizational changes will have impact on architectural strategy. Customer requirements would also cause technological changes on few parts of the system & up-gradation to newer platform or complying to newer standards without considering integrating systems leaves the whole product in a fragile state. Dead code is almost inevitable in long lived software maintained by big enterprises

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT