Frage

i'm just learning GWT MVP design pattern for weeks. now, i'd like to use this design pattern on a large web application. this application is a web ordering system wherein it has a login page and a main page. in the main page, it has buttons and a TabLayoutPanel wherein each tab contains the web ordering step - Tab1: select item(s) Tab2: view cart Tab3: post order.

Each tab has lots of widgets that manipulates the ordering process. now, i need to ask your idea on

how to properly separate each tab manipulation which follows the MVP pattern?

War es hilfreich?

Lösung

You question is not a black or white one. It depends on what the logical units of the problem are and how much interaction is on each tab. If the tabs are the main navigation between logical units of your application, I would say have a presenter for each tab (which also means an activity mapper for that area) - There would also be an presenter activity mapper for the non tabbed regions of your app also. But if each tab is just aspects of the process, then it may all logically fit in an overall presenter. Given what you said about the process, that it is kind of like a order wizard, I would tend to go with one presenter for the whole tabbed area where the presenter contained all the ordering knowledge and knew which step it was on.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top