i

JAVA Complete Course

Single Tier Architecture

Before starting speaking about any specific architecture, let me mention types of architecture. These are: Single Tier Architecture, Two Tier Architecture, Three Tier Architecture and generally N- Tier Architecture. The word “tier” is interchangeable with “layer”.

 Usually, applications have the following layers: Presentation Layer, Business Layer and Data Layer. Let’s revisit each of the layers in detail:

Presentation layer is the top most tier of architecture and it is also known as Client Layer. This is the layer we see during using a software. On this layer we can access the webpages. This layer is used to communicate with Application layer. User actions like: mouse click, keyboard type or etc. are passed from presentation layer to Application Layer. For example, login page of any website where an end user could see text boxes and buttons to enter credentials (username and password) and then sign-in. To say it shortly, it is to view the application.

Application Layer is also known as Business Layer is the tier which holds the actual business logic of our application. To continue the previous example of log-in webpage Application layer interacts with Database layer and sends required information to the Presentation layer. This layer is a mediator between Database and Presentation layers. Complete business logic will be written in this layer.

Data Layer is the place where we store the information, data. Application layer is the one which is communicating with Database layer in order to retrieve data. It contains methods for connecting database and then performs required operations e.g.: insert, update, delete etc.

Single Tier Architecture

One tier architecture is the most primitive one and the least used in real applications as in this case we have all layers: Presentation, Application and Data in the same package. In that case, data layer is inside the application and it stored data in local system or shared drive. But MS office system is an example of one tier architecture.