locked
What is the best UI pattern to presentation layer RRS feed

  • General discussion

  • I'm studying several patterns to know what is the best in an environment with n-tier architecture, windows forms (datagridview, textbox, etc...) and business objects (I don't use datasets between layers, also I use business objects). I think that the Model View Presenter is a good pattern because it allows me in a future to replace the windows forms to... for example, web pages. But I don't sure of this, I think that is an important desition in design time.

    What you think?
    Albert Gassó
    Computer Engineer
    Barcelona (Spain)
    Wednesday, November 11, 2009 12:24 AM

All replies

  • You'll want to use something like Model-View-Presenter if you want to keep flexibility for changing the presentation layer in the future.

    The main thing will be making sure to keep a clean separation of your model.  Changing the View/Presentation around later is fairly easy, provided you keep your model well insulated from the View.

    This will also make it possible to translate to MVVM with Silverlight/WPF, or to MVC with something like ASP.NET MVC, etc.

    Reed Copsey, Jr. - http://reedcopsey.com
    Wednesday, November 11, 2009 12:51 AM
  • Hi Albert,

    The options you have are MVC, MVP and ASP.Net MVC

     MVP Pattern

    View is more loosely coupled to the model. The presenter is responsible for binding the model to the view.

    Easier to unit test because interaction with the view is through an interface

    Usually view to presenter map one to one. Complex views may have multi presenters.

    MVC Pattern

    Controller are based on behaviors and can be shared across views

    Can be responsible for determining which view to display

    Please look into the pros and cons based on your requirement  and decide on the pattern


    I would suggest to go for MVP

    Regards
    Azhar

    Mark as asnwer if it helps


    Thanks and Regards Azhar Amir
    Wednesday, November 11, 2009 3:32 AM
  • I have a last question.

    I will need to use Smart Client Software Factory?, or it is an environment that will cause the prolonged process of design and development?.

    Thanks for all.
    Albert Gassó
    Computer Engineer
    Barcelona (Spain)
    Wednesday, November 11, 2009 8:02 AM
  • Hi,

    Software factories proven solution for common challenges faced, it also comes with resuable components, templates and extensions and i am sure it will actually bring in productivity benefit to your project.
    It is recommened to use software factories

    Regards
    Azhar

    Mark as answer if it helps
    Thanks and Regards Azhar Amir
    Wednesday, November 11, 2009 8:20 AM