DEV Community

Cover image for Three Tier Architecture. Overview and Each tier explained.
Barrington Hebert
Barrington Hebert

Posted on

Three Tier Architecture. Overview and Each tier explained.

      Three tier architecture is a pattern, or order of operations that pertains to the manner in which we go about building an application or program. Each tier will run on it's own infrastructure, and can be developed simultaneously. A three tier architecture design benefits our code organization, and scalability, as well as providing a way in which we can visualize the interaction between different systems that help bring our application to life. The three tier architecture system consists of the Client Tier, Business Logic Tier, and the Data Tier. These tiers are also referred to as layers, the presentation layer, the application layer, and the database layer. Before we get into the depths of three tier architecture and it's layers, it is good to have a basic understanding of one and two-tier architectures.

Image description

      One tier architecture will contain all 3 layers within one application. All data and logic is stored on the same system, systems that use one tier application are things like mp3 players, or MS Paint. Two tier architecture is divided into 2 sections, the first tier will be the client layer and the second will be the server layer. The two tier architecture applications are apps where the user is directly communicating with a server that holds data, Microsoft Access is a good example of a two tier architecture, where the client is directly communicating with a back end server. As for the 3 tier architecture, it consists of all three layers, which pertains to the majority of E-commerce websites like Amazon, and CMS (content management systems) sites, such as WordPress. Due to the fact these applications being more complex, the three tier architecture allows for a separation of concerns and allows more scalability and more efficient maintenance.

Client Tier // Presentation Layer

Image description

      The first tier is the client tier, which is considered the presentation layer. This layer considers your front-end framework, or how your app to be displayed, which can be via laptop, mobile phone, or even a smart TV! It is called the client/presentation layer because this is the layer that your clients will interact with, and where the magic of your code will be presented, such as your web browser. On this layer, the client will see text boxes, and buttons, and will enter interact with your page via clicking on things and entering information, and all of this information will later be handled by our second tier, which is called our business logic tier or application layer.

Business Logic Tier // Application Layer

Image description

      The second tier is called the logic tier, or the business layer, and considers the workflow, or the manner in which the first tier information will be handled from behind the scenes. This is where the heart of the application lies. It is considered the business logic tier because this is where your front-end code will begin to handle the business of performing tasks based on the users interactions with your application. This tier will contain your JAVA , PHP, Python, or basic development tools and files. As the client interacts with an application, the application layer will interact with a database, and relay information back to the presentation layer. This layer acts as a mediator between the presentation and database layer. It will communicate with the data tier by using API calls and will also update the data within it.

Database Tier // Data Layer

      The third tier is called the data tier which considers what data will need to be used, Your second tier will rely on information within the database in order to relay information back to the presentation layer. This is where the data is stored, which will pertain to server operating systems such as Oracle and MYSQL. The first two tiers rely heavily on the information and data stored here.

Image description

      So this is essentially the 3 tier architecture. The first tier being where you enter information, the second tier being where this information is handled, and the third tier being where the data for the second and first tier is stored.

Top comments (0)