This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Is HandlerManager really necessary?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

My partner and I have been writing a web app following the MVP architecture laid out here: https://developers.google.com/web-toolkit/articles/mvp-architecture

As this is our first foray into web development, GWT has been incredibly helpful and useful, but forgive my questions should they sound naive.

I'm trying to figure out why the HandlerManager is even necessary. The way we currently manage our app through the AppController is to keep a stack of Presenters and push new screens onto the stack and pop them off when you're done with them.

In the Contacts example Google provides in the above link, it seems the HandlerManager does 2 things when the event is called: write a history item, go to a new presenter.

Is this really necessary? If we end up making an app with 100 screens, we'll end up having 100 Event classes and 100 EventHandler classes. Seems to me like the views and presenters should be enough, while each presenter and decide which presenters it can go to.

Thanks in advance to anyone that can either confirm my feelings or give me a reason to use the HandlerManager.

Matt
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really like the eventHandler either (Or the eventBus)
Could you explain a bit more how you are doing you AppController? it seens like a good idea.

 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic