Your SlideShare is downloading. ×
JavaEE and                          Google AppEngine                            Aleš Justin, JBoss by RedHat              ...
Agenda               •      What is GAE and CDI?               •      Why GAE in CDI?               •      Other technolog...
About me               •      Old school JBoss-ian                     •    Microcontainer co-author                     •...
GAE               •      Forked Jetty               •      Many (logical) restrictions               •      RDBMS → BigTab...
CDI               •      Context and Dependency Injection               •      JSR-299 → JBoss Weld RI               •    ...
Why GAE + CDI?               •      Simple reason: playing with CDI and GAE               •      Android app with server b...
CDI #2               •      @Inject                                         •   @Produces               •      @Qualifier ...
Other technologies               •      JPA               •      JSF2               •      BeanValidation               • ...
Initial problems               •      CDI                     •    “Entry” mechanism                     •    Request / Re...
Initial problems                     •    JPA                          •   Limited relationships (Entity Groups)          ...
Initial problems               •      JSF2                     •    Context parameter settings                     •    “n...
Initial problems               •      BeanValidation                     •    Static usage with JPA                     • ...
Initial problems                     •    javax.cache (GCache)                          •   No partition                  ...
“Production” problems               •      CDI                     •    “Bean scanning” → patch                     •    “...
“Production” problems                          •   JPA                              •   Explicit entity usage             ...
Testing               •      ShrinkWrap               •      Arquillian                     •    https://github.com/alesj/...
Tattletale PR                          http://tehnik.mobitel.si/m-android-                          glasovanje/?app=8     ...
Q&A               •      Tattletale ➠ Weld               •      Tattletale ➠ JBossAS                                      ...
Upcoming SlideShare
Loading in...5
×

JavaEE and Google AppEngine

1,302

Published on

La presentazione di Aleš Justin,
in occasione del Codemotion, Roma 5 marzo 2011 http://www.codemotion.it

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,302
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "JavaEE and Google AppEngine"

  1. 1. JavaEE and Google AppEngine Aleš Justin, JBoss by RedHat Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  2. 2. Agenda • What is GAE and CDI? • Why GAE in CDI? • Other technologies • Problems and solutions • Testing • Q&A Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  3. 3. About me • Old school JBoss-ian • Microcontainer co-author • Weld lead • Amateur GAE user Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  4. 4. GAE • Forked Jetty • Many (logical) restrictions • RDBMS → BigTable • Simple Map(Reduce) • Good administration • Free basic usage Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  5. 5. CDI • Context and Dependency Injection • JSR-299 → JBoss Weld RI • “type-safe” programming • “contexts” concept • Easy to extend: “Extensions” Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  6. 6. Why GAE + CDI? • Simple reason: playing with CDI and GAE • Android app with server backend → Tattletale • Zero administration / configuration • Reliable up-time • No more “boiler-plate” code → CDI Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  7. 7. CDI #2 • @Inject • @Produces • @Qualifier • @Observes • @Named • @ConversationScoped • @Scope • @Decorator • Interceptors • @Alternative • InjectionPoint / • @Stereotype Instance Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  8. 8. Other technologies • JPA • JSF2 • BeanValidation • javax.cache • JSON • ShrinkWrap + Arquillian Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  9. 9. Initial problems • CDI • “Entry” mechanism • Request / Response binding • Lack of “lifecycle” handling Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  10. 10. Initial problems • JPA • Limited relationships (Entity Groups) • Transaction per “Entity Group” • Old DataNucleus version • Long vs. Key entity key • “Enhanced” entities • GeoModel hashing queries (“IN” keyword) Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  11. 11. Initial problems • JSF2 • Context parameter settings • “new InitialContext” → patch • “built-in” EL 1.0 → workaround Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  12. 12. Initial problems • BeanValidation • Static usage with JPA • Size • Configuration Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  13. 13. Initial problems • javax.cache (GCache) • No partition • NUCCORE-540 → hack • JSON • Different versions → patch → bug • Arquillian • Missing GAE “container” implementation Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  14. 14. “Production” problems • CDI • “Bean scanning” → patch • “Lazy bean creation” → MVC re-write • GZIP + Base64 usage • “Fall-back / repeat” mechanism Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  15. 15. “Production” problems • JPA • Explicit entity usage • Maximize cache usage • “Caching” → Lazy EMF • javax.cache • serialVersionUID! • Non-primitive variables • Cache evict/clear mehanizem Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  16. 16. Testing • ShrinkWrap • Arquillian • https://github.com/alesj/arquillian • DEMO Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  17. 17. Tattletale PR http://tehnik.mobitel.si/m-android- glasovanje/?app=8 Android 1.5+ ➠ GAE Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011
  18. 18. Q&A • Tattletale ➠ Weld • Tattletale ➠ JBossAS Aleš Justin - ales.justin@jboss.orgSaturday, March 5, 2011

×