Questions tagged [three-tier]

The three-tier architecture model is a framework for logical design model; it segments an application's components into three tiers of services that correspond to logical layers of the application.

The three-tier architecture model is a framework for logical design model; it segments an application's components into three tiers of services. These tiers do not necessarily correspond to physical locations on various computers on a network, but rather to logical layers of the application.

A three-tier architecture is a client-server architecture in which the functional process logic, data access, computer data storage and user interface are developed and maintained as independent modules on separate platforms.

The three tiers are usually defined like this:

  • Presentation tier: this is the topmost level of the application. The presentation tier displays information related to such services as browsing merchandise, purchasing and shopping cart contents. It communicates with other tiers by which it puts out the results to the browser/client tier and all other tiers in the network. (In simple terms it is a layer which users can access directly such as a web page, or an operating systems GUI)
  • Application tier (also known as business logic, logic tier, or middle tier): the logical tier is pulled out from the presentation tier and, as its own layer, it controls an application’s functionality by performing detailed processing.
  • Data tier: the data tier includes the data persistence mechanisms (database servers, file shares, etc.) and the data access layer that encapsulates the persistence mechanisms and exposes the data. The data access layer should provide an Application Programming Interface (API) to the application tier that exposes methods of managing the stored data without exposing or creating dependencies on the data storage mechanisms. Avoiding dependencies on the storage mechanisms allows for updates or changes without the application tier clients being affected by or even aware of the change. As with the separation of any tier, there are costs for implementation and often costs to performance in exchange for improved scalability and maintainability.

During an application's life cycle, the three-tier approach provides benefits such as reusability, flexibility, manageability, maintainability, and scalability.

109 questions
69
votes
11 answers

MVC vs. 3-tier architecture?

What is the basic difference between MVC and 3-tier architecture?
chhaya
  • 719
  • 1
  • 6
  • 7
69
votes
8 answers

what is the difference between 3 tier architecture and a mvc?

what is the difference between 3 tier architecture and a mvc ? Are they same? Both have 3 layers i.e model, views and controller
user1414880
13
votes
3 answers

Pass DTO to service layer

Is it not bad practice to pass DTO object to service layer? For now my service layer method look like this: public save(MyEntity entity); Mapping values from DTO to business entity (MyEntity) is done on presentation layer But I want to change…
WelcomeTo
  • 19,843
  • 53
  • 170
  • 286
13
votes
1 answer

what is Microsoft.Practices.EnterpriseLibrary.Data

I want to know what Microsoft.Practices.EnterpriseLibrary.Data.dll is and why we use this assembly. What are the benefits of this dll? I want to create a project on 3-tier architecture and am curious on what is the best way for performing sql…
ankit Gupta
  • 313
  • 1
  • 5
  • 19
11
votes
3 answers

Three-tier architecture and exceptions

It's considered good practice to have an exception for each layer of application (i.e. PresentationException, ServiceException, PersistenceException etc). But what if my service-layer directly calls DAO methods (methods of persistence layer) without…
WelcomeTo
  • 19,843
  • 53
  • 170
  • 286
9
votes
3 answers

DataAnnotations or validate manually in services?

Each time I start working on a new ASP.NET MVC web application, I'm not sure whether or not to use DataAnnotations validation. Something about it feels wrong. For example, let's say I have a UserService which is passed a CreateUserModel from the…
Martin
  • 113
  • 1
  • 4
6
votes
1 answer

3-layer architecture - passing data between layers

Trying to implement 3-layer (not: tier, I just want to separate my project logically, on one machine) architecture I've found so many different approaches that I'm confused, what's the best way (if there's any) to make that in WinForms app. Now I…
mj82
  • 5,193
  • 7
  • 31
  • 39
5
votes
3 answers

Practical way for separate Entity classses (DTO) from EDMX

I have a 3-tiered application DAL has EDMX file that EF6 generated it automatically from database (DB First mode). I have BLL and UL layers too. But, when I want to use BLL methods in UI, I must add DAL assembly to UI layer (because of return types…
Hamed F
  • 800
  • 3
  • 11
  • 23
5
votes
1 answer

Default function values in multi-layer architecture

Wondering the best way to set defaults in a multi-layer application structure. Specifically, if a certain work flow requires a nested set of function calls, is the default specified on all the functions, or just on the top level function and passed…
Clay Wardell
  • 14,846
  • 13
  • 44
  • 65
4
votes
4 answers

Is a three-tier application architecture necessary?

I've worked on a project that implements a three-tier architecture with the following design: Presentation Layer - Uses PHP with an MVC framework to handle frontend presentation and business logic. This layer makes calls to the service layer, which…
user543936
  • 407
  • 1
  • 4
  • 13
4
votes
4 answers

Best way to deal with conflated business and presentation code?

Considering a hypothetical situation where an old, legacy presentation library has been maintained over the years, and has gradually had more and more business logic coded into it through a process of hasty corrections and lack of proper…
bwerks
  • 8,651
  • 14
  • 68
  • 100
4
votes
7 answers

How MVC (ASP.NET MVC) band 3-tier architecture can work together?

I am writing a design document and people on my team are willing to do the move from ASP.NET WebForm to ASP.NET MVC. This is great, but I have a hard time to understand how MVC workswith in a 3-tier (Data Layer, Business Layer and Presentation…
Martin
  • 39,309
  • 62
  • 192
  • 278
4
votes
5 answers

Where should configuration be placed?

I have an application structured as follows: dao domain main services utils I've made a class that reads the application configuration from an XML file. The question is where should it be placed? By reflex, I'd have placed it in utilities but…
James P.
  • 19,313
  • 27
  • 97
  • 155
4
votes
4 answers

Is it advisable to use a .resx file to store common string references in a class library?

Is it advisable to use a .resx file to store common string references in a business layer class library? I typically only ever see these been used in the presentation layer.
fin
  • 1,275
  • 4
  • 18
  • 34
3
votes
1 answer

Linq to Entities - Drill down filter (Asp.net)

I've been searching for a good way of doing multiple "where" filters on an entity collection from linq. There are lots of sites that use a filter for their searches on the side, like ebay. The technique used is called a "drill down" filter. Now I'm…
Julian
  • 1,105
  • 2
  • 26
  • 57
1
2 3 4 5 6 7 8