What is N-Tier architecture?

Wikipedia:

In software engineering, multi-tier
architecture (often referred to as
n-tier architecture) is a
client-server architecture in which,
the presentation, the application
processing and the data management are
logically separate processes. For
example, an application that uses
middleware to service data requests
between a user and a database employs
multi-tier architecture. The most
widespread use of “multi-tier
architecture” refers to three-tier
architecture.

It’s debatable what counts as “tiers,” but in my opinion it needs to at least cross the process boundary. Or else it’s called layers. But, it does not need to be in physically different machines. Although I don’t recommend it, you can host logical tier and database on the same box.

alt text

Edit: One implication is that presentation tier and the logic tier (sometimes called Business Logic Layer) needs to cross machine boundaries “across the wire” sometimes over unreliable, slow, and/or insecure network. This is very different from simple Desktop application where the data lives on the same machine as files or Web Application where you can hit the database directly.

For n-tier programming, you need to package up the data in some sort of transportable form called “dataset” and fly them over the wire. .NET’s DataSet class or Web Services protocol like SOAP are few of such attempts to fly objects over the wire.

Leave a Comment