0% found this document useful (0 votes)
46 views15 pages

Topic Three-Tier Client Server Architecture in

Uploaded by

cisco75cc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views15 pages

Topic Three-Tier Client Server Architecture in

Uploaded by

cisco75cc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Week :

Topic : Three-Tier Client Server Architecture in BS Software Engineering


Java Programming 4th Semester

Mr. Saad Shahzad


Lecturer: CS & IT
Course : Advanced Computer Programming The Superior university
Lahore,
Faisalabad Campus
Three-tier client-server architecture

 The most common type of multi-tier architecture in distributed systems is a three-tier client-server
architecture.
 In this architecture, the entire application is organized into three computing tiers
1. Presentation tier
2. Application tier
3. Data-tier
 The major benefit of the three tiers in client-server architecture is that these tiers are developed and
maintained independently and this would not impact the other tiers in case of any modification. It
allows for better performance and even more scalability in architecture can be made as with the
increasing demand, more servers can be added.
What is Three-Tier Architecture?

 Three-Tier Architecture is an is an well established software application design pattern which will
organizes the application in the three logical and physical computing tiers as following:
1. Presentation Tier
2. Application Tier
3. Data Tier
1- Presentation Tier

 It is the user interface and topmost tier in the architecture. Its purpose is to take
request from the client and displays information to the client. It communicates with
other tiers using a web browser as it gives output on the browser. If we talk about
Web-based tiers then these are developed using languages like- HTML,XML. CSS,
JavaScript.
2-Application Tier

 It is the middle tier of the architecture also known as the logic tier as the
information/request gathered through the presentation tier is processed in detail here.
It also interacts with the server that stores the data. It processes the client’s request,
formats, it and sends it back to the client. It is developed using languages like- Python
, Java, PHP, etc.
Data Tier

 It is the last tier of the architecture also known as the Database Tier. It is used to store the processed
information so that it can be retrieved later on when required. It consists of Database Servers like-
Oracle, MySQL, DB2, etc. The communication between the Presentation Tier and Data-Tier is done
using middle-tier i.e. Application Tier.
Tier vs. layer

Tier Layer
Tier refer to the physical separation of components. Layer refers to the logical separation of an application.

Tiers are physical separated and running on the different Layers are logically separated but running on the same
machines are servers. servers or the machines.

Scalability of an application is very high. Scalability of an application is medium.

Common tiers in a multi-tier architecture include the Each layer focuses on specific responsibilities, such as
presentation tier (user interface), application tier presentation, business logic, and data access, within a
(business logic), and data tier (database). single tier.
Three-Tier Application In Java Development

 Understanding the 3-tier architecture will provide you with a more structured approach to your
projects, making them easier to manage and scale. Let's break down how the 3-tier architecture fits into
your programming experience with MySQL for the database, Java Swing for the front end, and Java
for the backend.
1. Presentation Tier (Front-end):
In your case, the front end would be developed using Java Swing. This tier is responsible for presenting the user
interface and interacting with the user. It includes all the GUI components such as buttons, text fields, labels, etc.
Here's how it fits into the 3-tier architecture:

• Responsibilities:
 User interface design using Java Swing.
 Collecting input from the user.
 Displaying data to the user.
Three-Tier Application In Java Development

2. Application Tier (Middle Tier or Business Logic Tier):


Your Java programming for defining logic will fit into this tier. This tier acts as an intermediary between the
presentation tier and the data tier. It contains the business logic and processes the data received from the presentation
tier before sending it to the data tier. Here's how it fits into the 3-tier architecture:
 Responsibilities:
 Processing user input.
 Implementing business logic.
 Interacting with the database tier.
Three-Tier Application In Java Development

3. 3. Data Tier (Back-end):


Your MySQL database will serve as the data tier. This tier is responsible for storing, retrieving, and managing data.
Here's how it fits into the 3-tier architecture:
 Responsibilities:
 Storing and managing data using MySQL.
 Handling data retrieval and storage operations.
 Ensuring data integrity and security.
How they work together:

 Presentation Tier <-> Application Tier:


 Java Swing UI sends user actions and input data to the Java backend.
 Java backend processes the input, implements the necessary business logic, and
prepares the data to be sent back to the presentation tier.
 Application Tier <-> Data Tier:
 Java backend interacts with the MySQL database to retrieve, update, or delete data
as required by the business logic.
 It also performs necessary data validations and transformations before storing or
fetching data from the database.
Benefits of Three-Tier Architecture

1.Maintainability:
• Modular Design: Each tier can be developed, tested, and maintained
independently. Changes in one tier do not directly affect the others, making the
system easier to manage.
• Code Reusability: Business logic and data access layers can be reused across
different presentation layers (e.g., web, mobile).
• Ease of Updates: Updates or bug fixes in one layer can be deployed without
affecting other layers, facilitating smoother maintenance and updates.
Benefits of Three-Tier Architecture

2. Scalability:
• Independent Scaling: Each tier can be scaled independently based on load. For
example, multiple instances of the Logic Tier can be deployed to handle
increased business logic processing, while the Data Tier can be optimized for
large database queries.
• Load Balancing: The Logic Tier can distribute the load across multiple servers,
improving performance and response times for the Presentation Tier.
Benefits of Three-Tier Architecture

3. Security:
• Isolated Layers: Each tier can implement its own security measures, providing
layered security. For instance, the Data Tier can restrict direct access and only
allow access through the Logic Tier.
• Encapsulation of Business Logic: Sensitive business logic is encapsulated within
the Logic Tier, reducing the risk of exposing critical logic to the client.
• Secure Data Access: Direct database access is restricted, and the Logic Tier
manages data interactions, reducing the risk of SQL injection and other database-
related attacks.
conclusion

In conclusion, employing a three-tier architecture in a client-server


application developed with IntelliJ and MySQL offers significant
advantages in maintainability, scalability, and security. Each tier
has clear responsibilities, allowing for better modularization and
easier management of the application as it evolves. This
structured approach facilitates smoother development, testing,
and deployment processes, ultimately resulting in a more robust
and adaptable system.

You might also like