Search code examples
asp.netarchitecture

Layers in 4 Tier Architecture in ASP.Net


As per this article in 4-tier architecture, the Business object is also considered a layer.

In this application, we will have the following 4-Tiers (As given on the blog)

  1. Business Object [BO]
  2. Business Access Layer [BAL]
  3. Data Access Layer [DAL]
  4. UI (4-Tier) folder [UI]

I want to clarify, in Software architecture, do we consider Business Object as a separate layer?

My second question is

If we have a two-tier architecture it means we can have two physical servers, one server can have only DB (Database Server), and another server will consist of Presentation (UI), Business Logic, Data Access Layer, and Business Object. Is it correct?

and

In three tiers we can deploy the UI layer on one server (T1), Business Logic, Data Access Layer, and Business Object on another server (T2), and a Database separate server (T3). In this case, we have to create a service (.Net service or WCF or remoting) to expose the object for the UI layer.

I am not sure about 4 tier architecture. As per [this] article it describes 4 layers including the business object (BO). I am not sure whether we consider BO as a layer or not.

Looking for kind help as I found.


Solution

  • Typically, layer is used to denote logical grouping while tier is used for physical grouping. So first thing, I would typically called it as n-Layer architecture rather than 4-Tier architecture. See this article for more about layers and tiers

    Now, BO layer sighted in the article is really what typically known as DTO (data transfer objects) as those are POCO entities - these are considered as cross-cutting components and can be used from any layer. Other infrastructure components (such as logging, audit trail etc) also falls into similar cross-cutting components. Although, its a logical group, they are not generally called layer.

    How you host your layers in physical groups (processes/servers) would decide number of tiers. So you can have database as one tier, app server (IIS) hosting UI/BL/DAL as another tier and browser/client as third tier. Again, you can host BL/DAL on app server and UI on web server creating more tiers.