SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
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
    •   Technical split not necessarily conceptual
        split (i.e address book & mail client)
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 (authorization roles)
Solution #2: MVC

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

                             •   Less coupled

                             •   Still compile-time dependencies
                                 (controller to view)


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


                             •   Messaging through publish / subscribe

                             •   Baseline on Messaging API

                             •   Single, shared dependency

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

•   Decoupling through de-typed nature
    •   No compile-time checking
•   Exchange protocol (contract) not “visible”
    •   Choreography validation?
        (Chasing the red bullet)
Challenge #3:
        UI Components coupled to
               services
•   I.e. Email client (UI) requires SMTP service
    (backend)
•   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”

                                                  •   Performed when application starts

                                                  •   Problem: Fixed initialization point

                                                  •   Lazy Components?


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

             •      Presence: “I need a SMTP service. Please notify me.”

                  •      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/

Weitere ähnliche Inhalte

Was ist angesagt?

Ad110 - Unleash the Power of Xpages
Ad110 - Unleash the Power of XpagesAd110 - Unleash the Power of Xpages
Ad110 - Unleash the Power of Xpagesddrschiw
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7Lukáš Fryč
 
AD112 -- Development and Deployment of Lotus Product Documentation Wikis
AD112 -- Development and Deployment of Lotus Product Documentation WikisAD112 -- Development and Deployment of Lotus Product Documentation Wikis
AD112 -- Development and Deployment of Lotus Product Documentation Wikisddrschiw
 
Mule overview
Mule overviewMule overview
Mule overviewF K
 
Ad106 - XPages Just Keep Getting Better
Ad106 - XPages Just Keep Getting BetterAd106 - XPages Just Keep Getting Better
Ad106 - XPages Just Keep Getting Betterddrschiw
 
WebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingWebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingVijaya Raghava Vuligundam
 
Class.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsClass.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsRoss Tang
 
Version control softwares
Version control softwaresVersion control softwares
Version control softwaresNicholas Rutzen
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationNordic Infrastructure Conference
 
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...WASdev Community
 
Swetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMBSwetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMBshwetha mukka
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)Roman Kharkovski
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercisesddrschiw
 
TechDoc - WMB - Administration - Logs
TechDoc - WMB - Administration - LogsTechDoc - WMB - Administration - Logs
TechDoc - WMB - Administration - LogsGlen Brumbaugh
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsMårten Gustafson
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutionsSangjin Lee
 

Was ist angesagt? (18)

Ad110 - Unleash the Power of Xpages
Ad110 - Unleash the Power of XpagesAd110 - Unleash the Power of Xpages
Ad110 - Unleash the Power of Xpages
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7
 
AD112 -- Development and Deployment of Lotus Product Documentation Wikis
AD112 -- Development and Deployment of Lotus Product Documentation WikisAD112 -- Development and Deployment of Lotus Product Documentation Wikis
AD112 -- Development and Deployment of Lotus Product Documentation Wikis
 
Mule overview
Mule overviewMule overview
Mule overview
 
Ad106 - XPages Just Keep Getting Better
Ad106 - XPages Just Keep Getting BetterAd106 - XPages Just Keep Getting Better
Ad106 - XPages Just Keep Getting Better
 
WebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingWebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development Training
 
Class.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsClass.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devops
 
Version control softwares
Version control softwaresVersion control softwares
Version control softwares
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configuration
 
Java modularization
Java modularizationJava modularization
Java modularization
 
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Swetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMBSwetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMB
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercises
 
TechDoc - WMB - Administration - Logs
TechDoc - WMB - Administration - LogsTechDoc - WMB - Administration - Logs
TechDoc - WMB - Administration - Logs
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime Environments
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutions
 

Andere mochten auch

Errai Workspaces
Errai WorkspacesErrai Workspaces
Errai Workspaceshbraun
 
Gwt cdi jud_con_berlin
Gwt cdi jud_con_berlinGwt cdi jud_con_berlin
Gwt cdi jud_con_berlinhbraun
 
Rob And Simone
Rob And SimoneRob And Simone
Rob And Simonetbirdemily
 
Jbpm4 Deployer
Jbpm4 DeployerJbpm4 Deployer
Jbpm4 Deployerhbraun
 
AS7 Console 2013
AS7 Console 2013AS7 Console 2013
AS7 Console 2013hbraun
 
Errai Workspaces
Errai WorkspacesErrai Workspaces
Errai Workspaceshbraun
 
One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011hbraun
 
Gwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunGwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunhbraun
 
Ivascu Andreea
Ivascu AndreeaIvascu Andreea
Ivascu Andreeadadeya
 
обзор российского рынка соков
обзор российского рынка соковобзор российского рынка соков
обзор российского рынка соковkr_ISTINA
 
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACIONJordan Felipe Cabrera Nuñez
 
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5Jordan Felipe Cabrera Nuñez
 

Andere mochten auch (17)

Constructivismo ruso
Constructivismo rusoConstructivismo ruso
Constructivismo ruso
 
Errai Workspaces
Errai WorkspacesErrai Workspaces
Errai Workspaces
 
Gwt cdi jud_con_berlin
Gwt cdi jud_con_berlinGwt cdi jud_con_berlin
Gwt cdi jud_con_berlin
 
Rob And Simone
Rob And SimoneRob And Simone
Rob And Simone
 
Jbpm4 Deployer
Jbpm4 DeployerJbpm4 Deployer
Jbpm4 Deployer
 
AS7 Console 2013
AS7 Console 2013AS7 Console 2013
AS7 Console 2013
 
Errai Workspaces
Errai WorkspacesErrai Workspaces
Errai Workspaces
 
One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011
 
Gwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraunGwt cdi jaxrs_hbraun
Gwt cdi jaxrs_hbraun
 
Ivascu Andreea
Ivascu AndreeaIvascu Andreea
Ivascu Andreea
 
London
LondonLondon
London
 
Stratford
StratfordStratford
Stratford
 
обзор российского рынка соков
обзор российского рынка соковобзор российского рынка соков
обзор российского рынка соков
 
Bath
BathBath
Bath
 
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION
12. Ponencia GESTIÓN DE LA CALIDAD PARA EL LOGRO DE LA ACREDITACION
 
Motor diesel 4 d65 --reparacion
Motor diesel 4 d65  --reparacionMotor diesel 4 d65  --reparacion
Motor diesel 4 d65 --reparacion
 
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5
Pruebas al sistema de inyección electrónico del motor Nissan almera QG 1.5
 

Ähnlich wie Patterns&Practices-Errai

Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011camp_drupal_ua
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to knowdaveymni
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015Phil Leggetter
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017Stefano Bonetta
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformAndrew Ferrier
 
The eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with MicroservicesThe eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with Microservicesyinonavraham
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
A Tail of Two Containers: How docker made ci great again
A Tail of Two Containers: How docker made ci great againA Tail of Two Containers: How docker made ci great again
A Tail of Two Containers: How docker made ci great againKyle Rames
 
Efficient Parallel Testing with Docker
Efficient Parallel Testing with DockerEfficient Parallel Testing with Docker
Efficient Parallel Testing with DockerLaura Frank Tacho
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best PracticesPavel Mička
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...Jean Vanderdonckt
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent Biret
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent Biret
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowVincent Biret
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 

Ähnlich wie Patterns&Practices-Errai (20)

Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
The eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with MicroservicesThe eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with Microservices
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
A Tail of Two Containers: How docker made ci great again
A Tail of Two Containers: How docker made ci great againA Tail of Two Containers: How docker made ci great again
A Tail of Two Containers: How docker made ci great again
 
Efficient Parallel Testing with Docker
Efficient Parallel Testing with DockerEfficient Parallel Testing with Docker
Efficient Parallel Testing with Docker
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
 
Protractor survival guide
Protractor survival guideProtractor survival guide
Protractor survival guide
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 

Patterns&Practices-Errai

  • 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 • Technical split not necessarily conceptual split (i.e address book & mail client)
  • 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 (authorization roles)
  • 15. Solution #2: MVC (1) Model changed • Model-View-Controller ? • Less coupled • Still compile-time dependencies (controller to view) (2) Update View
  • 16. Solution #2: Pub/Sub (1) Publish messages • Messaging through publish / subscribe • Baseline on Messaging API • Single, shared dependency (2) Subscribe Listener
  • 17. Limitation #2: Pub/Sub • Decoupling through de-typed nature • No compile-time checking • Exchange protocol (contract) not “visible” • Choreography validation? (Chasing the red bullet)
  • 18. Challenge #3: UI Components coupled to services • I.e. Email client (UI) requires SMTP service (backend) • 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” • Performed when application starts • Problem: Fixed initialization point • Lazy Components? (2) PluginInfo (type, available)
  • 20. Solution #3: Messaging w. Presence • Presence: “I need a SMTP service. Please notify me.” • 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