Applications are developed to support organizations in their business operations. Applications accept input, process the data based on business rules, and provide data as output. The functions performed by an application can be divided into three categories: user services, business services, and data services. Each category is implemented as a layer in an application. The user services layer constitutes the frontend of a solution. It is also called a presentation layer because it provides an interactive user interface.
The business services layer controls the enforcement of business rules on the data of an organization. Business rules encompass those practices and activities that define the behavior of an organization. For example, an organization may have decided that the credit limit of clients cannot exceed $200000. The business services layer performs validations pertaining to business rules. It ensures that the back-end does not receive incorrect data. The data services layer comprises the data and the functions for manipulating this data. These three layers form the base of the models or architectures used in application development.
Applications may vary from single-tier desktop applications (applications that follow the single-tier architecture) to multi-tier applications (applications that follow the two- , three-, or n-tier architecture).
Single-Tier Architecture
In the case of the single-tier architecture, a single executable file handles all functions relating to the user, business, and data service layers. Such an application is also called a monolithic application. Some of the very early COBOL programs performing extremely mission-critical operations fall under this category.
Monolithic Application
| | | | | |
| User Services | | Business Services | | Data Services |
| | | | | |
Two-Tier Architecture
The two-tier architecture divides an application into the following two components:
- Client: Implements the user interface
- Server: Stores data
In the two-tier architecture, the business services layer may be implemented in one of the following ways:
- By using fat client
- By using fat server
- By dividing the business services between the user services and the data services
In the case of fat clients, the business services layer is combined with the user services layer. Clients execute the presentation logic and enforce business rules. The server stores data and processes transactions. The fat client model is used when the server is overloaded with transaction processing activities and is not equipped to process business logic.
In a two-tier architecture with a fat server, the business services layer is combined with the data services layer. As business services are stored on the server, most of the processing takes place on the server.
You can also implement a two-tier model in which the business services are distributed between the user and data services. In this case, the processing of the business logic is distributed between the user and data services.
Three-Tier Architecture
In three-tier architecture, all the three service layers reside separately, either on the same machine or on different machines. The user interface interacts with the business logic. The business logic validates the data sent by the interfaces and forwards it to the database if it conforms to the requirements. The front-end only interacts with business logic, which, in turn, interacts with the database.
Client Business Logic Data Store
| | | | | |
| User Services | | Business Services | | Data Services |
| | | | | |
N-Tier Architecture
An n-tier application architecture is not restricted to a specific number of layers. It has multiple servers handling business services. The advantages of n-tier architecture are:
- Extensibility
- Resilience to change
- Maintainability
- Scalability
These applications serve organization-specific requirements. Therefore, most modern enterprise applications are based on the n-tier application architecture.
No comments:
Post a Comment