Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:11:39+00:00 2026-06-17T13:11:39+00:00

I have been looking at this tutorial https://developers.google.com/web-toolkit/articles/mvp-architecture What I was wondered is with

  • 0

I have been looking at this tutorial
https://developers.google.com/web-toolkit/articles/mvp-architecture
What I was wondered is with this MVP style how efficient is it that every time a user changes page that it goes and creates a new instance of the Presenter. Would the presenters be better if they were singletons? My end goal is to deploy an app using PhoneGap so any performance gains would be useful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:11:40+00:00Added an answer on June 17, 2026 at 1:11 pm

    It all depends on your implementation.

    If you want the state to be saved on your view you could go with a singleton presenter/view.

    It is more efficient, as you do not need to re init the view but less efficient if some transaction on another view makes a change that will need to change the first view. In this case you need to raise an event in the second presenter that is caught on the first presenter and modifies the view accordingly. This makes the application a little less predictable.

    So if each presenter/view is independent a single view/presenter would be the thing to do.

    In any other case I would go with a new presenter/view to re-initialize the data in the forms the view uses.

    Bear in mind though that each new presenter that uses application wide variables (such as an event bus) would not be destroyed (garbage-collected) which would lead to the following problem:

    Any time you load a View and an event is raised that is caught in the corresponding presenter, the event and all the calculations will occur as many times as a new presenter/view is generated.

    Example:
    -Presenter1/View1 is loaded and catches some event
    -Presenter2/View2 is loaded
    -Presenter1(new instance)/View1(new instance) is loaded and catches some event.
    -Event is raised via the global event bus
    -Presenter1 catches the event
    -Presenter1(new instance) catches the event

    So in essence (that is not a rule) a new presenter gives the GWT application a web-page with full postback feeling, and in the other case you have the Desktop application feeling that loads already existing forms.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking everywhere but could not find a tutorial for this. I
I have been looking around the web for this but cannot really find a
I have been looking into this tutorial: http://blog.new-bamboo.co.uk/2009/12/30/html5-canvas-snake-game But I am for some reason
Hi thanks for looking into this. I have been following Django's tutorial on URLs
I have been looking at this for to long so I am tossing it
I have been looking over this code for the past hour, I cant see
I have been looking all over for this. I have two seperate prpt files
I have been looking for an answer to this on Stack Overflow, but I
I have been looking for some time for this and I can't seem to
I have been looking for an answer to this and could not find it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.