Hi Everybody, Which Technology is better? ASP.net 3 layered architecture or MVC Please Let me know.
MVC does separate your application and forces you in same way to already use a 3 layered architecture. Model -> Think of this as your DAL (Data Access Layer) View -> Presentation Layer Controller -> Not a Layer, but you can add one more to include a Business Logic Layer.
What I usually do with my MVC projects is create a View Model and use that as my business logic layer.
Both MVC and 3 Layered Architecture are patterns and architectures. It just so happens to be that ASP.NET MVC was designed with a pattern in mind.
ADP.NET MVC is essentially a layered architecture, at least in simpler applications. The term is a bit of a misnomer in the web world, as the link between direct user input (keyboard/mouse) and the controller (as existed in the original MVC pattern some decades ago) no longer exists. Try thinking of it this way:
Browser
Layer 1: View <=> Presentation UI
App Server
Layer 2: Controller <=> Presentation Layer
Layer 3: Model <=> Business Layer
DB Server
Layer 4: Database
In larger applications, MVC often plays the role of a much richer "Presentation Layer", which contains its own set of models to facilitate presentation-specific behavior. An explicit business layer, often remoted via web services, likely also exists. The final (or bottom) layer is usually a database of some kind. This tends to reside on its own physical server as well. Ultimately, regardless of whether you have a simpler application which just uses MVC, or a more complex application which uses MVC as the presentation layer (or a variation thereof, such as MVP, MVVM, etc.), most applications are written in a layered fashion, often distributed across three physical server tiers (N-Tier architecture).
Presentation tier This is the topmost level of the application. The presentation tier displays information related to such services as browsing merchandise, purchasing, and shopping cart contents. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network. Application tier (business logic, logic tier, data access tier, or middle tier) The logic tier is pulled out from the presentation tier and, as its own layer, it controls an application’s functionality by performing detailed processing. Data tier This tier consists of database servers. Here information is stored and retrieved. This tier keeps data neutral and independent from application servers or business logic. Giving data its own tier also improves scalability and performance.
Comparison with the MVC architecture
At first glance, the three tiers may seem similar to the model-view-controller (MVC) concept; however, topologically they are different. A fundamental rule in a three-tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middleware tier. Conceptually the three-tier architecture is linear. However, the MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model.