Layered Application Architecture from a Gardener’s Perspective

Low-Code Solutions Experts (LCSE)
3 min readAug 11, 2024

--

Did you know that 1m2 of soil in a well maintained garden has about 1 billion living organisms that are all working together in order to keep the soil healthy. A healthy soil means healthy vegetation, which leads to beautiful flowers, fruit and herbs. But before one can enjoy the display of flowers or taste the fruit, a garden needs to be built up from several layers; soil & water, roots, vegetation, flowers and fruit. This means that basically every garden has a Layered Application Architecture, since all that grows, is grown through loosely coupled layers.

Data Layer — soil

A good gardener will start making an excellent soil layer, which will function as the core layer. This core layer of soil produces an environment for the layer on top to consume from the soil. So as a Mendix developer, consider how to make a healthy core layer. How is your domain model structured? Is it secure? Does it perform well? Is it well maintainable? The better your Core Layer is structured and performed, the healthier it is.

Core and Business Layer — Root System

A healthy Core Layer brings forth a healthy Business Layer, unless you fail in taking care of your Business Layer. Like plant roots take care of the plant’s most vital core functionalities, so does the Core / Business Layer take care of the vital core functionalities of your application. This is where your retrieve, insert, delete and update microflows are running. In addition, this is the layer you will cover with Unit Tests.

Application layer

A healthy soil with a healthy root system will bring forth a beautiful plant. But flowers and fruit do not grow by themselves. The leaves play a crucial part in the process of creating flowers and fruit. Let’s say the leaves are the nanoflows and interface actions, retrieving from the core layers. Like plants in the garden drink water from the soil, through the roots, so you need to get your data from the data layer through the Core layer at your application layer.

UI layer

Eventually, we come to the UI layer, of flowers, fruit and herbs. This is where it’s all about. We can interact with the UI. The UI layer of a plant receives input from its environment. Sunlight tells it to grow by photosynthesis, which uses the energy of the sun to convert it into sugars that feed the plant. The carbon returns to the soil, the layer with the 1 billion mechanisms.

Integration layer

At last, the garden from this example needs an additional integration layer of water and fertilizer in order to ‘feed’ the soil. Without the integration layer the soil will dry out and no mechanisms will live. Many Mendix applications need an external system to feed their own data layer.

The beauty of a Layered Application Architecture like a garden is that every layer can be replaced; also called loosely coupled. You can use a hose or bucket in order to water the soil, it does not matter for the roots. Also, it doesn’t matter where you put the plant in the soil. You can grow both an apple tree and a rose in the same soil. You can also build multiple modules on one Core or Business Layer. Once a plant grows you can determine how it grows by influencing its growing process, which eventually leads to the beauty of the flower or taste of the fruit to enjoy.

To wrap things up; Structure your application in different layers, each with its own responsibilities, security, reusability and capabilities. Build a healthy layered Application Architecture so your customer can enjoy a healthy and sustainable User Interface.

--

--

No responses yet