SlideShare a Scribd company logo
Best practices for building
 large GWT applications
    Heiko Braun <hbraun@redhat.com>
About me
•   Heiko Braun
•   Senior Software Engineer JBoss / Red Hat
•   4 years JBoss, 12 years industry
•   Focus on SOA, BPM, GWT
•   Contributor:
    JBossWS, jBPM, Riftsaw, Errai, SAM, Savarra

    > http://jboss.org
Topics


•   What is GWT?
•   Decomposing a large GWT application
•   Introducing project Errai
What is GWT?
Google Web Toolkit
•   Write AJAX apps in the Java language, then compile to
    optimized JavaScript

•   SDK: API, Compiler, Hosted Mode Browser

•   Edit Java code, then view changes immediately without
    re-compiling

•   Step through live AJAX code with your Java debugger

•   Compile and deploy optimized, cross-browser
    JavaScript

    > http://code.google.com/webtoolkit/
GWT Features
•   Communicate with your server through really simple RPC

•   Reuse UI components across projects

•   Use other JavaScript libraries and native JavaScript code

•   Localize applications

•   Choice of development tools

•   Test your code with JUnit

•   Open Source
Decomposing large
GWT applications
Example: JBoss SOA tooling
Challenge #1:Feature Set

     •   Different features per:
         •   Target runtime
         •   Development stage
         •   Project lifecycle
         •   Target audience
Solution #1:
Compile-time composition

•   Leverage Maven dependency sets
•   Using Deferred Binding
    •   Create and select a specific implementation
        of a class
    •   Either using Replacement or Generators
Solution #1:
           Compile-time composition
(1) ‘mvn -Dconsole.profile=drools install’




                                                      (2) Properties file or annotations




                                            (3) Deferred Binding Generator
Limitation #1:
        Component interplay
•   Each plugin component isolated
•   No interplay possible
    •   It would introduce dependencies
•   Grouping by functionality vs. usability
    •   Conceptual split not necessarily technical
        split
Challenge #2: Coupling
between components
Challenge #2: Coupling
         between components
•   Components “decorate” functionality
    •   i.e. Process Management & Reporting
•   Dependencies may come and go
    •   Different feature set:
        - Maturity (CR vs. GA)
        - Environment (staging vs. production)
        - Profiles (custom composition)
Solution #2: MVC

                             •
(1) Model changed
                                 Model-View-Controller ?

                             •   Less coupled

                             •   Still compile-time dependencies



(2) Update View
Solution #2: Pub/Sub
 (1) Publish messages

                             •   Messaging through publish / subscribe

                             •   Messaging API only shared
                                 dependency

                             •   Notion of “presence”

(2) Subscribe Listener
Limitation #2: Pub/Sub

•   Decoupling through de-typed nature
    •   No compile-time checking
•   Exchange protocol (contract) not “visible”
    •   Choreography validation?
Challenge #3:
        UI Components coupled to
               services

•   I.e. Email client requires SMTP service
•   Services may come and go:
    •   SOA promise
    •   Different product versions

    •   Target runtime derivations
Solution #3: Bootstrap
(1) Client UI starts, request server status       •   Bootstrap: “Give me a list of
                                                      capabilities”

                                                  •   Usually RPC call when app starts

                                                  •   Problem: Fixed initialization point

                                                  •   Lazy Components?


(2) PluginInfo (type, available)
Solution #3: Messaging w. Presence

             •      Presence: “Need a plumber. Please call XYZ”

                  •      Relies on messaging bus behind the scenes

                  •      Async, independent, durable

(1) Client: Seek capability




                                                        (2) Provider: Offer capability
Introducing Project Errai
Project Errai
•   Consolidates JBoss GWT efforts
•   Tackles the problems described earlier
•   Both R&D and actual product development
•   Main components:
    •   Message Bus, Workspace framework,
        Widget library

        > http://jboss.org/errai
Errai-Bus
•   Backbone to application
    design

•   Common architecture
    across client&server

•   Enables federated
    architecture

•   Asynchronous messaging
    (pub/sub)

•   Conversational

•   Both GWT and Javascript
    API (OpenHub Spec)
Errai-Bus API:
 Common to client & server
(1) Client: Publish




(2) Server: Subscribe
Pub/Sub roles vs. tiers

•   client-client across server (chat server)

•   client-client w/o server (inter component)

•   client-server (client send)

•   server-client (server push)
Workspace framework
•   UI environment for which to deploy your console

•   Provides development infrastructure, documentation and
    examples:
    - Tear down barriers, ease of use

•   Common, shared services, i.e:
    - Authentication & Authorization
    - Logging & Exception handling

•   Allows toolset composition at various stages:
    - Sandbox, Project, Product
Workspaces API
     •    Handles loading, initialization and access to tools

     •    Uses Deferred Binding as well

(1) Component declaration                            (2) Automatic workspace assembly
Errai Widgets
• Complements OSS offering (i.e. Mosaic)
Putting it all together
•   Baseline for JBoss SOA
    tooling

•   Free composition of
    console components

•   Different projects
    provide management
    tools

•   Mix and match with
    3rd party elements
Demo Applications
Q&A
> http://jboss.org/errai
> http://errai-blog.blogspot.com/

More Related Content

PDF
Patterns&Practices-Errai
PDF
GWT Jug Stuttgart
PPTX
Subversion and bug tracking
PPT
Class.mobilefirstfoundation.chapter.2.devops
PPT
Architecture Proposition For Multimedia repository
PPTX
20120315 netbeansplatform overview
PDF
Esigate dev meeting 25 03_2013
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
Patterns&Practices-Errai
GWT Jug Stuttgart
Subversion and bug tracking
Class.mobilefirstfoundation.chapter.2.devops
Architecture Proposition For Multimedia repository
20120315 netbeansplatform overview
Esigate dev meeting 25 03_2013
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...

What's hot (20)

PDF
Starting from scratch in 2017
PDF
Apache maven
PPTX
Java modularization
PDF
Ad110 - Unleash the Power of Xpages
PDF
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
PDF
Ad106 - XPages Just Keep Getting Better
PPT
Java Build Tools
PDF
AD112 -- Development and Deployment of Lotus Product Documentation Wikis
PPT
IBM WebSphere Application Server traditional and Docker
PDF
Connected Applications using WF and WCF
PPT
Flex introduction
PDF
AD113 -- IBM Lotus Notes Discussion Template: Next Generation and Other OpenN...
PDF
Zend con practical-zf1-zf2-migration
PDF
Calling all modularity solutions
PPT
Juggling Java EE with Enterprise Apache Maven
PPTX
S/W Design and Modularity using Maven
PPTX
System Architecture using Maven Modularity
PPTX
Neuro4j Workflow Overview
PDF
Introduction to Continuous Integration
PDF
Sunshine php practical-zf1-zf2-migration
Starting from scratch in 2017
Apache maven
Java modularization
Ad110 - Unleash the Power of Xpages
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad106 - XPages Just Keep Getting Better
Java Build Tools
AD112 -- Development and Deployment of Lotus Product Documentation Wikis
IBM WebSphere Application Server traditional and Docker
Connected Applications using WF and WCF
Flex introduction
AD113 -- IBM Lotus Notes Discussion Template: Next Generation and Other OpenN...
Zend con practical-zf1-zf2-migration
Calling all modularity solutions
Juggling Java EE with Enterprise Apache Maven
S/W Design and Modularity using Maven
System Architecture using Maven Modularity
Neuro4j Workflow Overview
Introduction to Continuous Integration
Sunshine php practical-zf1-zf2-migration
Ad

Similar to Jug Zurich Slides (20)

PDF
Gwt cdi jud_con_berlin
PDF
TS 5341 Rethinking the ESB
PPTX
Java Modularity with OSGi
PPTX
Gwt Deep Dive
PDF
Enterprise OSGi at eBay
PDF
JBoss / Red Hat: bridging the gap between web services technologies and real ...
PDF
Vii 2 Z Final Slides Os Gi Iess 2010
PDF
Calling All Modularity Solutions: A Comparative Study from eBay
PDF
Ow2 Open World Forum09 Migration With Telosys
 
PDF
Open World Forum 2009 Migration With Telosys
PDF
Oop2008 RESTful services with GWT and Apache CXF
KEY
EcoSystem Tools for Admins - AtlasCamp 2011
PDF
Cloud Native API Design and Management
PDF
Generated REST Gateways for Mobile Applications
PPTX
Gwt 2,3 Deep dive
PDF
SOA Latam 2015
PPTX
Developing for the Atlassian Ecosystem
PDF
Microservices and the Art of Taming the Dependency Hell Monster
KEY
Phonegap 2.x
PDF
Grails & the World of Tomorrow
Gwt cdi jud_con_berlin
TS 5341 Rethinking the ESB
Java Modularity with OSGi
Gwt Deep Dive
Enterprise OSGi at eBay
JBoss / Red Hat: bridging the gap between web services technologies and real ...
Vii 2 Z Final Slides Os Gi Iess 2010
Calling All Modularity Solutions: A Comparative Study from eBay
Ow2 Open World Forum09 Migration With Telosys
 
Open World Forum 2009 Migration With Telosys
Oop2008 RESTful services with GWT and Apache CXF
EcoSystem Tools for Admins - AtlasCamp 2011
Cloud Native API Design and Management
Generated REST Gateways for Mobile Applications
Gwt 2,3 Deep dive
SOA Latam 2015
Developing for the Atlassian Ecosystem
Microservices and the Art of Taming the Dependency Hell Monster
Phonegap 2.x
Grails & the World of Tomorrow
Ad

More from hbraun (7)

PDF
AS7 Console 2013
PDF
One daytalk hbraun_oct2011
PDF
Gwt cdi jaxrs_hbraun
PDF
Errai Workspaces
PDF
Errai CDI Integration
PDF
Errai Workspaces
PDF
Jbpm4 Deployer
AS7 Console 2013
One daytalk hbraun_oct2011
Gwt cdi jaxrs_hbraun
Errai Workspaces
Errai CDI Integration
Errai Workspaces
Jbpm4 Deployer

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
sap open course for s4hana steps from ECC to s4
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”

Jug Zurich Slides

  • 1. Best practices for building large GWT applications Heiko Braun <hbraun@redhat.com>
  • 2. About me • Heiko Braun • Senior Software Engineer JBoss / Red Hat • 4 years JBoss, 12 years industry • Focus on SOA, BPM, GWT • Contributor: JBossWS, jBPM, Riftsaw, Errai, SAM, Savarra > http://jboss.org
  • 3. Topics • What is GWT? • Decomposing a large GWT application • Introducing project Errai
  • 5. Google Web Toolkit • Write AJAX apps in the Java language, then compile to optimized JavaScript • SDK: API, Compiler, Hosted Mode Browser • Edit Java code, then view changes immediately without re-compiling • Step through live AJAX code with your Java debugger • Compile and deploy optimized, cross-browser JavaScript > http://code.google.com/webtoolkit/
  • 6. GWT Features • Communicate with your server through really simple RPC • Reuse UI components across projects • Use other JavaScript libraries and native JavaScript code • Localize applications • Choice of development tools • Test your code with JUnit • Open Source
  • 9. Challenge #1:Feature Set • Different features per: • Target runtime • Development stage • Project lifecycle • Target audience
  • 10. Solution #1: Compile-time composition • Leverage Maven dependency sets • Using Deferred Binding • Create and select a specific implementation of a class • Either using Replacement or Generators
  • 11. Solution #1: Compile-time composition (1) ‘mvn -Dconsole.profile=drools install’ (2) Properties file or annotations (3) Deferred Binding Generator
  • 12. Limitation #1: Component interplay • Each plugin component isolated • No interplay possible • It would introduce dependencies • Grouping by functionality vs. usability • Conceptual split not necessarily technical split
  • 14. Challenge #2: Coupling between components • Components “decorate” functionality • i.e. Process Management & Reporting • Dependencies may come and go • Different feature set: - Maturity (CR vs. GA) - Environment (staging vs. production) - Profiles (custom composition)
  • 15. Solution #2: MVC • (1) Model changed Model-View-Controller ? • Less coupled • Still compile-time dependencies (2) Update View
  • 16. Solution #2: Pub/Sub (1) Publish messages • Messaging through publish / subscribe • Messaging API only shared dependency • Notion of “presence” (2) Subscribe Listener
  • 17. Limitation #2: Pub/Sub • Decoupling through de-typed nature • No compile-time checking • Exchange protocol (contract) not “visible” • Choreography validation?
  • 18. Challenge #3: UI Components coupled to services • I.e. Email client requires SMTP service • Services may come and go: • SOA promise • Different product versions • Target runtime derivations
  • 19. Solution #3: Bootstrap (1) Client UI starts, request server status • Bootstrap: “Give me a list of capabilities” • Usually RPC call when app starts • Problem: Fixed initialization point • Lazy Components? (2) PluginInfo (type, available)
  • 20. Solution #3: Messaging w. Presence • Presence: “Need a plumber. Please call XYZ” • Relies on messaging bus behind the scenes • Async, independent, durable (1) Client: Seek capability (2) Provider: Offer capability
  • 22. Project Errai • Consolidates JBoss GWT efforts • Tackles the problems described earlier • Both R&D and actual product development • Main components: • Message Bus, Workspace framework, Widget library > http://jboss.org/errai
  • 23. Errai-Bus • Backbone to application design • Common architecture across client&server • Enables federated architecture • Asynchronous messaging (pub/sub) • Conversational • Both GWT and Javascript API (OpenHub Spec)
  • 24. Errai-Bus API: Common to client & server (1) Client: Publish (2) Server: Subscribe
  • 25. Pub/Sub roles vs. tiers • client-client across server (chat server) • client-client w/o server (inter component) • client-server (client send) • server-client (server push)
  • 26. Workspace framework • UI environment for which to deploy your console • Provides development infrastructure, documentation and examples: - Tear down barriers, ease of use • Common, shared services, i.e: - Authentication & Authorization - Logging & Exception handling • Allows toolset composition at various stages: - Sandbox, Project, Product
  • 27. Workspaces API • Handles loading, initialization and access to tools • Uses Deferred Binding as well (1) Component declaration (2) Automatic workspace assembly
  • 28. Errai Widgets • Complements OSS offering (i.e. Mosaic)
  • 29. Putting it all together • Baseline for JBoss SOA tooling • Free composition of console components • Different projects provide management tools • Mix and match with 3rd party elements