Asp.net RRS feed

  • Question

  • i am using N Tier Architecture. I want to know which Design pattern is best for Asp.net . 
    Sunday, June 26, 2011 6:30 PM

All replies

  • if you are using web in visual studio 2010 , do take time look into MVC ASP.NET 3.0 which can be found in visual studio 2010 professional edition. 
    Monday, June 27, 2011 11:29 AM
  • It depends.

    The obvious choices are Webforms, MVC or Silverlight.

    I wouldn't really call these design patterns though.

    The decider for MVC over webforms is whether you need automated testing.

    If you don't then webforms will probably be quicker than MVC.

    Tuesday, June 28, 2011 1:00 PM
  • Since asp.net will work as the web / presentation layer, have you explored the requirements behind this layer? I am not sure the over all solution tier structure can or should dictate the framework you choose for one specific layer. Ideally your layers should be loosely coupled with each other. That said asp.net offers options like webforms / mvc and on top of it you can consider use of silverlight / ajax. However, none of these should be governed by the tiering of the bottom layers.
    Tuesday, June 28, 2011 6:24 PM
  • The Model-View-Controller (MVC) and Model-View-Presenter (MVP) Patterns improve re usability of business logic by separating the three components required to generate and manage a specific user interface.
    Wednesday, July 13, 2011 6:37 AM
  • ASP.net has its own application layering model in default ASP.Net Web Form. Every asp.form has its presentation page with it code behind, that isolates the presentation from data bindings. That’s two parts of layering. Then you can write your Business login in separate class library and do the same for data logic. That’s give you essentially three layered architecture.

    However, when you talk about Tiering, you should be essentially able to deploy your architecture in three separate physical location as well as logical separation. And all these layer should be able to interact with each other in a loosely coupled way. It will introduce more flexibility and robustness into the system. When you talk about N-Tier you should be able to break down these layer into small component, say for you Customer Order management, you have a Customer Service (which only deals with customer maintenance) and Order Service (which deals with customer order). Hence, customer data service and order data service. When you do that, you essentially break down your system in 5 different layer and so forth.

    In terms of Design Principal, now you have the freedom to choose basic Web Forms with WCF service. Or ASP.Net MVC pattern with provides a framework for your Model-View-Controller layered implementation. If you are in Silverlight or WPF application, then you should consider MVVM pattern. You can look at PRISM for a guidance for MVVM implementation.


    Tanvir Huda Application Architect/Consultant
    Friday, July 15, 2011 6:26 AM