> MVP structure with item duplication prevented by checking > proposed additions to a shopping cart against all the others via the > event bus.
This is basically what I've done in my first GWT hierarchical MVP app. One of its functions is to collect two password recovery question choices, one from each of two listboxes The parent presenter adds two questionbox presenters which communicate selection choices via the eventbus. User selections for questions, answers, password updates, etc. bubble up this way to a level where it can be determined whether or not the update button can be enabled. At first, I thought this might be too fine-grained, but it's worked out well to separate out the logic this way. The problem I quickly ran into with MVP was that the ratio of boilerplate to interesting code was very bad. So, I built a quick and dirty codegen using StringTemplate that reads an XML description of the presenters/UI (no 2.0 yet) and generates a display impl, a presenter interface, a presenter impl abstract base class, associated events, and RPC plumbing (and validation bindings, etc, etc.) So far, so good....I feel like I'm writing mostly unique code without too many redundantly expressed ideas. One additional problem was that some of the presenter logic got very complicated very quickly. I ended up drawing a state machine and implementing it with SMC (http:// smc.sourceforge.net/). The presenter fires state machine actions which in return fire presenter methods to modify the display and other client-side state. With minor modification, the generated SMC code plays nicely in client-side GWT. I'm now interested in how hierarchical state machines could be used to model GWT apps in a more integrated way. How much of client side behavior can be declared without boxing a developer into a too-rigid framework? Would the resulting JavaScript be small enough? Has anyone else experimented with these sorts of things? Anyone interested enough in what I've done for me to attempt to open source it (it's corp-owned right now)? Am I completely off my rocker? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
