3-Tier Architecture in .NET Web Applications

Architecturemiddlewaren-tiernetweb-servers

Nowadays most systems are designed as web apps. In the .NET world the famous three tier architecture is usually translated like this.

  • Front End (Web Application)
  • Middle Tier (custom DLLs using an ORM to access and process data)
  • Back End (SQL Server, Oracle, MySQL)

To me, the middle tier is not actually the middle tier because regardless of how isolated the mid tier is, it executes in the context of a web server (as it resides in the DLLs) and essentially a part of the web application.

My Questions:

  1. Is it correct to say that a 3 tier arch is a simple 2 tier arch?

  2. Is it correct to design the apps, that requiring heavy data processing, with no physically separate middle tier?

  3. What options are available for the middle tier other than hosting it in WCF or Windows Service?

Best Answer

To me, the middle tier is not actually the middle tier because regardless of how isolated the design is and how stateless the DLLs are, they execute in the context of a web server only and essentially a part of the web application.

No, the middle tier could be in another server(s) altogether when it comes to large applications. For example you might be hosting the web frontend in one server and communicating with another server where domain model logic is hosted. Also depending on the demand of your system it could be multiple servers.

Is my observation and understanding correct that 3 tier arch is not really a 3 tier but a simple 2 tier arch?

Refer to the previous comment.

Is it correct to design the apps this way when there is no technical middle layer, even the applications that require heavy processing?

When heavy processing is required, it would not be optimal to use the web server to do the processing, as it would affect user experience and they may notice the web site is 'slow'. You could always delegate heavy/time consuming processing to some another server and display result to the user appropriately (push instead of waiting screen)

Current is the only option for middle tier for a web app is a windows Service and nothing else?

  1. It could be application server with exposed web service
  2. Scalable roles (similar to microsoft azure provides) subscribed to a queue