views:

55

answers:

1

Can anyone can tell me the N-tier Structure and their tiers used in Web Programming?

Primarily, in 3 tier structure one is presentation layer, another is business logic layer and last is database access layer.

But for N-tier or 4 tier structure what are the layers and what sort of functions do they hold on them? Please explain me with a brief example of each.

+1  A: 

You can adding caching layers as another tier. Caching can be added at a number of levels. For images, pages, database queries or just for individual files. A proxy server can cache pages for a certain length of time. This is really helpful for expensive pages.

Akamai has built an entire business out of this, although they have distributed caching. That can be considered a whole other tier. Serving content from the server closest to the server.

Load balancing and replication can be considered other tiers. This is fairly common, reads go to database slaves, writes go to the master. Firewalls can load balance to distribute traffic. For example, multiple web servers.

Brent Baisley
I was looking for a much simpler answer? Can you explain this basically?
Starx
In your 3 tier example, you are explaining MVC (Model,View,Controller), which is a design pattern, not really a tiered architecture. PHP on a web server, and your DB on a separate server is more of a tiered architecture. Specific functions on specific "tiers". The client computer can be a tier (i.e. javascript).
Brent Baisley