Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Gwt cdi jud_con_berlin

4,263 views

Published on

Using GWT with CDI

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Gwt cdi jud_con_berlin

  1. 1. GWT & CDI Heiko Braun <hbraun@redhat.com>
  2. 2. Topics • CDI & GWT • Use Cases & Requirements • Relevant Concepts • Likeminded Technologies • Demo
  3. 3. GWT & CDI
  4. 4. Google Web Toolkit • Create Ajax applications from Java sources • GWT SDK: Compiler, API, Tools • Creates highly optimized, portable javascript code
  5. 5. Context and Dependency Injection • CDI: JSR-299, JSR-330 • Reference implementation: Weld • Seam 3 • EE6 component model • Portable extensions • shrink-size or extend runtime (framework)
  6. 6. Use Cases & Requirements
  7. 7. Use Cases • Invoke CDI beans from GWT clients • RPC • Pub/Sub • Eventing • Expose domain models to GWT clients • Serialization
  8. 8. Example: RPC bean
  9. 9. Example: RPC Client
  10. 10. Requirements • “Seamless integration” • Verified concepts • Concise programming model • Reduction of boilerplate
  11. 11. Example: Event Bean
  12. 12. Example: Event Client
  13. 13. Relevant Concepts
  14. 14. Beans, Qualifiers & Scopes • Bean type: Client-visible type (class, interface) • Qualifier: Distinguish multiple beans of the same type • @Named, @Asynchronous • Scope: Determines instance lifecycle • @SessionScoped, @ConversationScoped, @RequestScoped
  15. 15. Build & Run-time • Run-time • Build-time • Deployment • Same Origin Policy? • GWT Compiler constraints • Transactions, Security • Domain model & API? • Context propagation? • Clustering, Failover • Hosted Mode • Stateful Ajax Client? • CDI Bootstrap? • Deferred Binding • Boiler plate Java Javascript
  16. 16. Example: Conversation Scoped Bean
  17. 17. Example: Client managed conversation (1)
  18. 18. Example: Client managed conversation (2)
  19. 19. Likeminded Technologies
  20. 20. Related Technologies • JPA • Serialization • Detachment (lazy/eager loading) • Merging • DataBinding • Widgets, Validation, Synchronization • JMS • Ajax client as Topic Subscriber/Publisher
  21. 21. Project and Roadmap
  22. 22. Errai & Weld • Errai acts as Umbrella (http://jboss.org/errai) • Weld as Reference implementation • Driven by both Errai and CDI Team • Same runtimes Weld supports: • SE, Servlet, EE6, EC2: “Start POC, grow big”
  23. 23. Questions? • Project: http://jboss.org/errai • Weld: http://seamframework.org • Blog: http://errai-blog.blogspot.com/ • IRC: irc.freenode.net#errai

×