Coding MVP into Connectr

Now that we have seen the different moving parts of Connectr MVP software, let's assemble everything together.

Starting up the application

  1. In GWT, the application entry point is onModuleLoad, located in the ConnectrApp class, which is as follows:
    package com.metadot.book.connectr.client;
    
    // Imports omitted for better readability
    
    public class ConnectrApp implements EntryPoint {
    
    …
      public void onModuleLoad() {
    
        singleton = this;
        login();
        createUI();
      }
  2. After creating a singleton reference to itself, onModuleLoad calls login() to get the current user or force a redirection to the login screen. At this stage of the application, since the login method has not been fully implemented, the backend returns a test user. We continue by ...

Get Google App Engine Java and GWT Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.