Anatomy of a modern 3-level architecture

Back to overview

Nowadays, most of the applications we use are based on a so-called 3-tier architecture. In this article, we will take a closer look at this architecture and the most commonly used technology stack.

First of all, the term "tier" should be clarified, which refers to the physical structure and should not be confused with "layer", which represents a logical separation of the code.

Dividing an application into layers enables our software to be loosely coupled, more secure and scalable.

Overview of the 3-level architecture

Front-end level

The front end is also known as the user interface (UI) and represents what a user sees and interacts with. This tier often consists of a web app for browser-based access (Chrome, Edge, Firefox) and native apps such as Android and iOS. These clients communicate with the backend tier mostly via HTTP(S) and/or a WebSocket protocol.

A web app is usually created using a JavaScript framework: React, Angular, Vue and Svelte are some of the best known.

The development of native Android apps requires the development tools from Google: Kotlin, Android Studio, Play Store. The development of native iOS apps requires Apple's development tools: Swift, Xcode, App Store. However, there are also cross-platform frameworks that help to speed up the development process: Flutter, Reactive Native, Vue Native, most of which use JavaScript to develop apps that are independent of the operating system and run on both Android and iOS.

Backend level

The backend layer is often implemented using a general-purpose language such as Java, Kotlin, Go, Python or PHP, to name but a few. This layer represents the business logic of the application. It enforces business rules and defines how objects interact with each other. Its tasks are, for example: controlling the execution sequence, calculations and computations, transaction management, composition of services and much more.

It must also enable communication between the frontend and backend. The backend must offer an API. REST or GraphQL are two common methods for designing backend APIs. These APIs can be accessed via HTTP(S) for client request-based communication or via WebSocket for full-duplex real-time TCP communication.

Some of the most popular frameworks for building backend systems are Spring Boot (Java, Kotlin), Express NodeJS (JavaScript) or Gin (Go).

Once the client request has been processed, the state of our application must be persisted. This is where a database-specific driver comes into play. It abstracts and simplifies the communication between our backend and our persistence layer. This way, we don't have to reinvent the wheel every time and take care of all the low-level technical details.

Persistence level

This is where the data is stored. There are a variety of database technologies. Broadly speaking, however, we can divide them into two categories: structured data (SQL) and unstructured data (NoSQL). The choice really depends on the requirements of the application, as each technology has its advantages and disadvantages.

Some popular representatives for NoSQL databases are MongoDB, CouchDB, Redis, Neo4J. PostgreSQL, MySQL, DB2, OracleDB are some of the well-known SQL databases.

In this article, we have examined the structure of a modern 3-tier architecture and how the individual layers communicate with each other. In addition, we have also mentioned some popular technologies that are used to build such systems.

Do you have any questions? We have the answers!

Please write to us. We look forward to hearing from you!