dimanche 28 février 2016

Use MVP "Passive" to centralize UI code

I have two applications, each providing the same business services to different set of users. Still there are variances in business validations and user interface.

Regarding UI:-

  • UI is based on Asp.Net Web forms
  • Applications include pages with different layout
  • Applications shares almost same functionality.

I plan to use MVP pattern to centralize the common code as possible.

Projects are Common, App1, App2.

  • Common: includes
    1. IUpdateView : Common API goes here
    2. UpdatePresenter : Centralized code goes here.


  • App1: includes

    1. IUpdateViewApp1 : IUpdateView

      Specialized API is added to IUpdateViewApp1

    2. UpdatePresenterApp1 : UpdatePresenter
      Specialized code goes here UpdatePresenterApp1

    3. UpdatePage.aspx : IUpdateViewApp1
      The page creates the presenter and passes it self as IUpdateViewApp1

Is there a simpler \ better solution to centralize the code of UI in such case.

Aucun commentaire:

Enregistrer un commentaire