Application Architecture

Three-tier architecture

Application Architectureis a kind of «framework» of the system. In the software development lifecycle, architecture design begins at the design stage.

Architecture combines technical and logical decisions: what components the application will include, how data will be transferred between them, where the business logic will reside, and how the user will interact with the system.

Three-Tier Architecture

Typically, an application’s architecture is described in layers:

The three-tier model, also known as layered architecture, underlies most modern applications.

User Interface

Frontend is the user interface that a person interacts with directly. It is responsible for displaying data and sending user actions to the server.

An example of a frontend interface is the «Login» form.

When testing the frontend, testers check:

  • correct display and data updates
  • input validation and restrictions
  • presence and clarity of error messages
  • interface response to user actions (clicks, input)
  • correctness and format of requests sent to the server
  • proper display across different devices

Note that the «Login» form contains bugs.

Login
Cat is logging in

Business Logic

Backend is the «invisible» part of the application where data processing takes place. It receives requests from the frontend, performs necessary operations, and returns results.

Typical backend tasks include:

  • data validation and processing
  • executing business logic
  • interacting with the database
  • forming a response for the frontend

if email does not match format:
    result = "Invalid email format"

elif db.getUser == found:
    result = "Successful login"

send(result)

Example of business logic for the «Login» form

Database

Database is the place where all application data is stored. It may contain information about users, orders, messages — everything the application needs to function.

When a user wants to log into their account, the backend sends a request to the database: “Find a user with this login and password.” The database retrieves the data, adds new records, or updates existing ones.

Name Email Address Password
tester-today tester.today.help@gmail.com password
... ... ...

Example of a table in the database

How the Layers Interact

1

User

enters data in the frontend

2

Frontend

sends a request to the backend

3

Backend

processes the request and queries the database

4

Database

returns the data

5

Backend

sends a response to the frontend

6

Frontend

displays the result to the user

The layers work as a single unit, but each is responsible for its own task. This separation simplifies development, testing, and scaling.

Which architectural layer is responsible for each action?
Action Layer
Display an error that the username format is invalid
Store user data
Check that the user’s login data exists in the database
Send the user’s login and password to the server during login
Sidebar arrow