Main Difference Between 3-tier & n-tier Architecture in .NET?
Asked Answered
M

4

7

I have searched Google to find the main difference between 3-tier and n-tier architecture in .NET but I have failed to find it out. Several sites said both are the same in nature and some of the sites said there are differences between them.

I want to know the major differences, and which one is better in performance optimization?

Montoya answered 18/7, 2012 at 13:49 Comment(2)
VERY close duplicate: https://mcmap.net/q/127567/-what-is-n-tier-architectureTrant
They are the same basic architectural pattern, but 3-tier always has 3 tiers, while n-tier has a variable number of tiers. It's impossible to make an accurate statement about which is better for performance optimization without any qualifications regarding environment, infrastructure, expected usage, what type of performance optimization, application structure and function, etc.Oily
F
12

3-tier architecture is general architecture in software development and it consists of

  • Presentation layer (client browser)

  • Application or Business logic layer

  • Data Layer

n-tier architecture in .NET

enter image description here

The main difference is that n-tier arch got 2 extra layers. Example on data layers one part of developers are SQL developers whose work is on DB server (making DB structure, writing Stored procedures and so forth), and .Net developers whose work on consuming that stored procedures and making abstraction ( implementing repository pattern)...

Hope this help you.

Formalize answered 18/7, 2012 at 14:29 Comment(2)
I think what you have explained is 3 Layer architecture and not 3 Tier , Tier refers to physical partition and not Layer refers to logical partition of the application..Abhorrent
the answer is misleading. There is a vivid difference between layers and tiers. The answer is making confusion between layers and tiers. #120938 ibm.com/cloud/learn/three-tier-architectureKarimakarin
E
8

I know this question is old, but the really simple and ultimately correct answer is:

3-tier is N-tier where N=3.

Endlong answered 11/4, 2014 at 3:40 Comment(0)
C
3

msdn link

An N-Tier application is an application where you have 3 or more physical tiers. I mean with that things like, “Presentation/Client Tier”, “Application/Business Server Tier” and “Data Tier” (a database server in most of the cases) and nowadays we use web services (or even better, WCF Services) to communicate between presentation tier and the application server tier. Here you see a simple & typical picture about N-Tier architecture:

A different matter is that we’d probably design our application as an N-Layer application, I mean, with several logic layers where we implement different logic tasks. For example we could have the DAL layer (Data Access Layer), BLL Layer (Business Logic Layer), BFLL Layer (Busines Façade Logic Layer), WCF Service Layer and several Presentation layers depending of the pattern we use, like MVC (Model-View-Controller), MVP (Model-View-Presenter), etc.. Also, within the N-Layer architecture, you can guess that Entity Framework fits as the DAL Layer (Data Access Classes) as well as using EF entities as our disconnected entities to pass thru all the layers, all right?

BTW, not all N-Layer apps should be N-Tier apps, but all N-Tier Apps must internally be designed as N-Layer. I mean, there are many cases where the less you physically split your model, the better for performance (more tiers is good for scalability but not for pure performance, due to latencies). Remember, N-Layer is about logic layers.

OK!, so if we get back to the N-Tier architecture (physical tiers), like I said, we need remote mechanisms to communicate the client tier with the application server tier (for instance, WCF Services) and therefore when we query the database from the app server tier, to obtain data (like an Order), we keep it as an EF entity, then we disconnect it from the EF context (detach), WCF serializes it and sends that disconnected entity to the presentation tier (client apps & machines).

Claudette answered 29/5, 2016 at 2:36 Comment(0)
K
0

The difference between N -Tier and 3 Tier is as follows.

In 3 Tier Application there are three tiers like Presentation Layer , Application Layer and Data layer. Here the application layer contains business logic as well .

On the other hand in N Tier Application layer is divided into 2 i.e. Application Layer and Business Logic layer. The Application Layer you can add up to N number depending on the data coming from presentation layer (Different OS , Different platforms etc).

Kristof answered 18/7, 2019 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.