Three Tier ASP.NET Apps

I hear from a lot of readers that they are creating 3-tier ASP.NET apps and I always wonder if they know where the middle tier is.

In my opinion, the web server is the middle tier and client tier is the browser. Creating another set of machines to host the data layer isn't really necessary and, in fact, hosting the data layer on the web server is easier to scale. We know how to scale out web servers. Inventing a new set of machines forces you to figure out how to scale them out and it does not increase your scalability by scaling out both the web server and a fourth tier.

If you disagree, please e-mail me and let me know what you think.

Comments:

Yes, you are wrong. You are talking about physical layers - what components is the web applications composed of and/or where they reside. When talking about 3-tier architecture, we usually mean somewhat different decomposition: presentation layer (responsible for user interface), business layer (does various business methods and enforces business rules) and data layer (manages data). It doesn't matter where these layers are located. Presentation layer is almost always implemented in ASP.NET (components such as data grid, buttons etc., code which responses to user events, ...). Code-behind constructs pages (user interface) by querying and working with various business objects (such as User, Invoice, Payment, ... - also C# code) and these objects make use of data layer to do persistence (this comprises some C# code to fill data reader, for example and stored procedures on database)...


 



 
Save Cancel