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 7794067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:41:01+00:00 2026-06-01T22:41:01+00:00

I have this web application which I have made with MVC pattern, however I

  • 0

I have this web application which I have made with MVC pattern, however I am trying to adapt the MVP pattern.

I am using the GWTPlatform library which I have migrated some of the codes already, mainly to the Presenter and the View. However I have not seen any comprehensive material to explain how to actually deal with the Model part. In my MVC pattern I have the model in the controller (in MVC) and the Views listen to changes in the Model to update the views. The model is updated by the controller, e.g fireUpdateUser() function is fired as a result of opening the “user page” for example which then updates the model.

How to I actually deal with the model in MVP if I already have remote services RPC (e.g UserService, UserServiceImpl); With Gwtplatform, I can just put a RPC call in the onReset() function of a presenter then essentially do a getView().getSomething().setValue(something) to update the View associated. In this case I did not have to use any model at all? Also, what are the purposes of EventHandler and Activities?

  • 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-01T22:41:02+00:00Added an answer on June 1, 2026 at 10:41 pm

    In your services you can inject DAO objects that deal with your data (model). You usually have an interface and its implementation.

    public interface IMyDao {
        List<String> getAllObject();
    }
    
    public class MyDao implements IMyDao {
        public List<String> getAllObject() {
            List<String> os = new ArrayList<String>();
            // DB access or Datastore (Sample code)
            os = datastore.query(...);
            return os;
        }
    }
    

    and in your service

    public class ServiceImpl implements Service {
    
      private final MyDao dao;
    
      @Inject
      public ServiceImpl(final MyDao dao) {
        this.dao = dao;
      }
    
      public List<String> getAllObject() {
        // Some processing
        return dao.getAllObject();
      }
    }
    

    Your service will be called by the presenter. So the workflow is Presenter -> Dao (Model) -> View (updated by the presenter).

    Have a look at that ebook, it will give you some ideas.

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

Sidebar

Related Questions

I have a web application that uses a library which resides in TOMCAT_HOME/common/lib. This
I have a JSON which I get from web application. I try this parse
I have this web application using Spring Web Flow framework. In my main page
I have developed a Web service using WCF Service Application. This service application is
I have a fairly simple data audit web application written with ASP MVC which
I was just designing this application and made many .aspx files which have my
I have a web application which uses LDAP for log in. I'm using Openid4Java
I have a web application developed using JSP and Servlet. This web application is
I have an application solution which is made up of a web app written
I have this situation: web application with cca 200 concurent requests (Threads) are in

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.