What is a three-tier architecture?

May 13, 2008 at 12:02 am | In Testing | Leave a Comment
Tags: , , , ,

A three-tier architecture is any system which enforces a general separation between the following three parts:

  1. Client Tier or user interface
  2. Middle Tier or business logic
  3. Data Storage Tier

Applied to web applications and distributed programming, the three logical tiers usually correspond to the physical separation between three types of devices or hosts:

  1. Browser or GUI Application
  2. Web Server or Application Server
  3. Database Server (often an RDBMS or Relational Database)

However, inside of the application server, there is a further division of program code into three logical tiers. This is kind of fractal: the part (app server object design) resembles the whole (physical system architecture). In a classic JSP/Servlet system, these objects are usually implemented as:

  1. JSPs or Servlets responsible for creating HTML or WML user interface pages
  2. Servlets or JavaBeans responsible for business logic
  3. Servlets, JavaBeans, or Java classes responsible for data access. These objects usually use JDBC to query the database.

In an EJB system, the three logical tiers are usually implemented somewhat differently:

  1. JSPs, Servlets, or Java client applications responsible for user interface
  2. Session Beans or Entity Beans whose methods implement business logic and business rules
  3. Entity Beans whose fields represent data; these fields are “persisted” (stored and retrieved) either by the EJB server (for container-managed persistence) or by the Entity Beans themselves (for bean-managed persistence)

As you can see, the precise definition of “tiers” can vary widely depending on the particular needs and choices of an application designer. However, they all maintain the general division of client-logic-storage.

If the architecture contains more than three logical tiers — for instance, multiple data feeds, multiple transactional data sources, multiple client applications — then it is typically called an “N-tier” or “Distributed” architecture.

Two Tier Architecture

May 12, 2008 at 11:48 pm | In Testing | Leave a Comment
Tags: , , , ,

What is a Two-Tier Architecture?

A two-tier architecture is where a client talks directly to a server,
with no intervening server.  It is typically used in small environments
(less than 50 users).
two tier architecture

Advantages and Disadvantages

The advantage of the two-tier design is its simplicity. The TopLink database session that builds the two-tier architecture provides all the TopLink features in a single session type, thereby making the two-tier architecture simple to build and use.

The most important limitation of the two-tier architecture is that it is not scalable, because each client requires its own database session.


Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.