KEMBAR78
Introduction à GWT | PDF
Introduction à GWT
La technologie derrière Google Adwords,
Spreadsheet, Inbox et plus encore!
CHRISTIAN GOUDREAU
WAQ 2015
Christian Goudreau
Co-Fondateur et Bee-EO
Arcbees
+ChristianGoudreau
@imchrisgoudreau
christian.goudreau@arcbees.com
Dans une galaxie...
l’Empire
2006
Découverte
de la planète
GWT
Pourquoi ?
Google
Adwords
Dans la même veine
Autres langages :
➔ Pyjs (Python to JS)
➔ emscripten (C++ to JS)
➔ jsil (.net to JS)
➔ ClojureScript (Clojure to
JS)
➔ dart2js
Javascript :
➔ CoffeeScript
➔ TypeScript
➔ Google Closure
La machine
virtuelle
du Web
Box2D
Performance
Benchmark
Box2D
Code Size
Box2D
Code Size
Google
Inbox
public class HelloWorld implements EntryPoint {
@Override
public void onModuleLoad() {
$("p").click(new Function() {
@Override
public void f() {
$(this).slideUp();
}
});
}
}
CodeSplit
Historique
de navigation
& SEO
➔ MVP
➔ Rest-Dispatch
➔ Historique de
navigation
MODEL
PRESENTER
VIEW
MVP
Pattern
REST
Dispatch
➔ JAX-RS
➔ Command pattern
➔ Implémentation la plus simple
possible
@Path(“/api/dashboard”)
public interface DashboardService {
@GET
@Path(“/{organizationId}”)
Dashboard getByOrganizationId(@PathParam(“organizationId”) int organizationId);
@PUT
@Path(“/{organizationId}”)
void update(@PathParam(“organizationId”) int organizationId, Dashboard dashboard);
}
private void loadTemplate() {
dashboardService.withCallback(new AbstractAsyncCallback<Dashboard>() {
@Override
public void onSuccess(Dashboard result) {
}
}).getByOrganizationId(currentUser.getOrganizationId());
}
Librairies
disponibles
Performance
Et Angular ?
Singular !
Et
GWTP ?
Et mes librairies
Javascript ?
GWT 2.7
JsInterop !
@JsType(prototype = "$wnd.Dashboard")
public interface Dashboard {
public static class Builder {
public static native Dashboard create(String modulePath) /*-{
return new $wnd.Dashboard(modulePath);
}-*/;
}
void clear();
void reset();
void render();
void redraw();
}
Merci
QUESTIONS ?

Introduction à GWT