Roost.ai blog on Generative AI and Large Language Models

Maven Principle Casts a Long Shadow on Modern Application Architecture

Written by Rishi Yadav | March 2022

The Maven Principle Casts a Long Shadow

 
If design patterns were the atoms of software architecture, design principles are the molecules or even compounds. Back in 1994, when a gang-of-four wrote Design Patterns: Elements of Reusable Object-Oriented Software, software architecture was not so complex. Over the years, a lot of modifications and enhancements were suggested to the foundational patterns in the book and I always found those attempts sacrilegious. It will be obvious why I feel this way once you have read this blog and I discussed the design principles.
 
 

Three Design Principles:
The commandments of the modern application architecture

If modern applications were human, the design principles would be virtues every application should strive for. There are three principles that I consider core to the modern application architecture and they are:

1. The Git Principle

2. The Maven Principle

3. The Principle of Immutability


What is striking about the first two principles is that they are not abstract in form but are the side-effects of the disruptive technologies and frameworks, I have named them after. These technologies were created to revolutionize source-code control and build respectively but have completely mutated the DNA of every modern application framework and technology which have come after them.

Since I have written a lot about Git Principle, In this blog, I am going to focus on Maven Principle and how long the shadow it casts.

 

The Maven Principle

When Maven was released, the two core tenets of Maven instantly caught my attention and there were:

  1. Declarative Dependency Management
  2. Convention Over Configuration

 

Declarative Dependency Management

Today all modern frameworks use the declarative paradigm and the imperative paradigm is almost considered an anti-pattern. This pattern did not exist before Maven (at least not in the mainstream) and dependency hell was real. I remember when I was consulting for a large bank in the mid-2000s, all versions of all relevant libraries were checked-in to the source-code control system. Maven changed that and the developer community never looked back.

Modern Infrastructure-as-code tools have internalized this principle and leading products like Terraform only use the declarative patterns for artifacts.

 

Convention Over Configuration

Maven popularized the virtue of convention over configuration.

It essentially means that the developer does not have to think about best practices. While Maven used this principle for basic things like organizing file systems (folks from the pre-maven era would content the basic classification), modern Environments-as-a-Service platforms like Roost.ai use this principle to create safe environments for pre-production workloads.

 

Summary

While design patterns were the right guideposts for legacy applications, modern applications should use design principles. As discussed above the three core design principles are git principle, maven principle, and the principle of immutability.

While the “declarative dependency management” part of the Maven Principle has become the defacto standard, “convention over configuration” is still in the infancy of adoption, and environments as a service platforms like Roost.ai are leading the way there.