Google Web Toolkit and the Model View Presenter architecture Philippe Beaudoin (Track Sponsor)

Slides:



Advertisements
Similar presentations
Community Planning Training 1- Community Planning Training 7-1 Community Planning Training 7-1.
Advertisements

The best example I have:
Legrandgroup.com legrand.country bticino.country cablofil.country ortronics.country bticino.country legrand.country cablofil.country ortronics.country.
© 2014 ELLUCIAN. ALL RIGHTS RESERVED – CONFIDENTIAL & PROPRIETARY. CALBHR: What Ellucian Does For You Jan Wilder Sr. Business Analyst, Ellucian February.
From Blobs to Structured Data SEO in the Age of Entities Jonathon Colman, In-House SEO for REI INFO 498: Content Strategy.
Name of presentation Company name. Second Page Your Text here Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod.
Full Scale PowerPoint Poster Template: 36" by 48" Layout
Kapi‘olani Community College, Honolulu, Hawai‘i
VIDEO MARKETING Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam Lorem.
Company name Name of presentation. Slide master Your Text here Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod.
VIDEO MARKETING Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam Lorem.
Poster Title Author Names INTRODUCTION RESULTS CONCLUSION
PRESENTATION TITLE.
Presentation Title Here
Name of presentation Company name.
TRIUMF, 4004 Wesbrook Mall, Vancouver, BC, Canada, V6T 2A3
POWERPOINT Best Solution !!
Multipurpose PowerPoint Template
AGENCY PowerPoint template.
Name of presentation Company name
Mathematics and Personal Resource Usage
Name of Presentation Click to add subtitle.
LOAD King Leonidas Anita Gudscore PERIOD 4.
Title of the poster can be put on multiple lines:
LET’S MAKE THINGS SIMPLE AND COOL
LET’S MAKE THINGS SIMPLE AND COOL
TRIUMF, 4004 Wesbrook Mall, Vancouver, BC, Canada, V6T 2A3
Multipurpose PowerPoint Template
Title of the poster can be put on multiple lines:
Instructions for Designing Your Abstract ePoster
A Language-based Perspective on Web Application Security
6 AMAZING POWERPOINT TEMPLATE 2016 For More Powerpoint Visit
The Title for the Poster Goes Here and
Title of the poster can be put on multiple lines:
The Title for the Poster Goes Here and
Name of presentation Company name.
Title of the poster can be put on multiple lines:
PRESENTATION Title |
LET’S MAKE THINGS SIMPLE AND COOL
More Free PowerPoint Templates at Freeppt.net
Weekly Activity Report
مرکز دانلود انیمیشن و پاورپوینت های سه بعدی و متحرک
مرکز دانلود انیمیشن و پاورپوینت های سه بعدی و متحرک
Title: Asdf Asdf Asdf Asdf Asdf Asdf Asdf
Full Scale PowerPoint Poster Template: 36" by 56" Layout
Multipurpose PowerPoint Template
Instructions for Designing Your Abstract ePoster
LOAD CHARACTER NAME PERIOD X.
Main Title And Second Line
Name of presentation Company name.
Name of presentation Company name.
Name of presentation Company name.
Bill G Media Full Scale Poster Template©: 38" by 44" Portrait
Full Scale PowerPoint Poster Template: 42" by 48" Layout
Full Scale PowerPoint Poster Template: 42" by 56" Layout
Instructions for Designing Your Abstract ePoster
COVER PAGE.
Poster Title Author Names INTRODUCTION RESULTS CONCLUSION
PRESENTATION Title |
COMPANY NAME Your Elevator Pitch John Doe, Founder
Name of Presentation Company Name. Slide Master Your Text here Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod.
Title of the poster can be put on multiple lines:
HSE | Presentation Title
Name of presentation Company name 搜集整理.
Name of presentation Company name 51PPT模板网-
Main Findings in plain English. Emphasize important words.
Brief Descriptive Title Goes Here!
Main Findings in plain English. Emphasize important words.
PRESENTATION Title |
PRESENTATION Title |
Presentation transcript:

Google Web Toolkit and the Model View Presenter architecture Philippe Beaudoin (Track Sponsor)

About me… Lead developer at BookedIN.net Founder of arcbees.com (consulting) Creator of gwtplatform.com (Starting at Google in two

Our tools (you’ll need…) Eclipse Helios (for Java Developer, or more) Google Plugin for Eclipse – – Take the SDKs too GWTP Plugin for Eclipse –

Our stack Java HTML / CSS GWT GWT-Platform (GWTP aka gooteepee) GIN (Guice for GWT) (AppEngine)

GWT Google Web Toolkit Build complex browser-based apps in Java – Java  javascript cross compiler – All the goodies of Java Rock-solid IDEs and tools Refactoring Unit testing Deferred binding – Serves a different app to different users Chrome + Français? Check! Tablet + Ancient greek? Coming right up!

GWT-Platform Greatly simplifies writing MVP code Includes a command pattern – Action-based client/server exchanges Best thing since sliced bread! – Trust the author! ;)

GIN Guice for GWT As-simple-as-possible dependency injection Ginjector – The “master factory” Module – Java code to bind interfaces to implementations Then: on your constructors!

Our architecture MVP: Model View Presenter Model (entity graph) View – Dumb, no logic Presenter – Logic, no UI code Advantages – Testability – Low coupling

Root vs RootLayout Web Page vs Web app Browser scrollbar vs Your own scrollbars Infinite Page vs Full screen

Presenter lifecycle (1) onBind() : right after construction – Add handlers to the view, see registerHandler() – One time setup (NOT in the constructor) onUnbind() : when released – Has to be called manually (fot now) – Undo any setup operations done in onBind() – Except for registerHandler()

Presenter lifecycle (2) onReveal() : from invisible to visible onHide() : from visible to invisible onReset() : when navigation occurs and the presenter is still visible after – NOT the same as onReveal() as soon as you have a presenter hierarchy – The right place for most “update” operations

Command pattern Operations are wrapped in classes Send the class to the server with a dispatcher Results are also wrapped in classes Idea: keep them in a stack for undo/redo!

URL parameters Saving part of the presenter state in the URL – Good for bookmarks – Or for navigation (back, forward) Ex: Override prepareFromRequest()

Nested Presenters Services Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Logged in as PhilBeaudoin | logout Blog Our services Contact Us Presenter 1 not a place Presenter 2 not a place Presenter 3 a place

Event bus Keep these presenters decoupled Use the EventBus to communicate Example: – Presenter3 tells Presenter2 which tab to highlight Better: Use GWTP tabbed presenters! – System broadcasts that a user has logged in

Other features of GWTP (1) PresenterWidgets – Great for reusable components – Light-weight way to decouple UI from Logic Hierarchical ajax URLs – #!product-list;type=phones/!product;id=323 – Ideal for breadcrumbs Gatekeepers – Dynamically block out presenters

Other features of GWTP (2) Dispatcher goodies – Action caching/batching, client-side handling – ActionValidator (server-side security) Search engine crawler support – Make these “hash bang” URLs crawlable Google Analytics support – Track navigation at the presenter level Helpers for internationalization

Testing? Check out Jukito, the best (only?) automocking testing framework for Gin/Guice. Also: the second best thing since sliced bread. Also: I created it… ;)

Need help? arcbees.com GWT AppEngine

Slides, GWTP and doc at: Code at: