Saturday, May 25, 2013

Gwt latest tweaks, tips and future roadmap from the Google I/O 2013!


Gwt latest tweaks, tips and future roadmap from the Google I/O 2013!


1.When to use the view-presenter model and when to refrain from it?
   Do not use presenter and view separately as long as you have a definate need to do so.
   Its' okay to use a single view if the complexity of design is not more as it reduces overhead.
   Check that the view-presenter model makes good use of the UI Binder.

Rule of the thumb: Start with simplest solution that can work, add complexity only when needed.

2.How to enable testability in rich views?
  Any rich views established should have any logic be put into presenter so as to accomplish testability.
  Its always good to combine the logic, get rid of boiler plate code and place it in the Composite to accomplish easy maintainability.

3.Which testing engine to use for testing GWT implementation?
  Use the mockito to test th GWT implementation.

4.Are GWT apps mobile ready?
  Apps in GWT are mobile ready. One of the primary advantages of the GWT application is that  portability of the app to mobile platform and dynamic reference through nocache.js at run time for performance optimization.

5.What is the role of event bus in MVP architecture?
  EventBus is a global static object inserted into each of the presenters that helps you have
  communication with different nodes of a tree without each node knowing who its talking to.

6.How to design your application for GWT based events?
  Each application has a design tree for functions and certain events that get triggered
  and might be required to cross reference different nodes of separate trees at different levels.
  Decouple your visual hierarchy from the communication model to ease out maintainability.
  In such a scenario its always easy to add code for a new functionality on the event bus and let it   handle the events rather than increase complexity by doing a cross reference by adding code to each node.

7.How to get more details on the event based architecture?
  Check https://github.com/google/gwteventbinder for events.

8.General guideline around design?
  Keep using methods for tightly coupled components in your system. use events wherein notifications are required. 99% of the time events are either user inputs or response coming back from the server. Any extra layer is always harder to optimise but in that case optimisation is not important.

9.What is the future roadmap for GWT?
 1. A separate open community for GWT has been established. There has been a separate GWT website established at www.gwtproject.org
 2. Also GWT code is being maintained by RedHat doing continuous integration at
                build.gwtproject.org and mirroring the same at
        GIT repository
Github - github.com/gwtproject
Source - gwt.googlesource.com
Code Review - gwt-review.googlesource.com
 3. External leaders would be part of Gwt community and driving different browser support and modules for GWT.
 4. Below major areas of focus have been defined for future -
i. Openness and simplicity - Move the complete source to open source, full mavenization of the code build. Reduce the need for .gwt.xml files and delete deprecated code to make lightweight code.
ii.Speed -  improve super dev mode refresh speed, improve code splitter, tune to modern JS VMS & better profiling tools.
iii.Inter-operability - improve support and integration with closure compiler and include java 7 & 8 support.
iv.Mobility - support for modern mobile web browsers, mobile optimized widgets and application lifecycle with offline capability.
v.Reliability - remove support for older browsers and improve gwt unit testing.
vi.Embeddability - pieces of gwt can be embedded in apps.
 5. GWT Compilation speed is aimed to be reduced by 50%.

No comments:

Post a Comment