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.
RAPID JAVA              Using APPLICATION              JBoss Forge,                          Arquillian &                 ...
DEVELOPER PRODUCTIVITY                     - WHAT IF?          Faster Start-Up Times	                     80% Less Configur...
GREAT !!!
J2EE #fail         #fail             EJB                 #fail
PURPOSE OF THIS TALK¡  Demonstrate productivity gains §  Less Code, Classes and Configuration¡  Address Concerns §  Ab...
J2EE 1.4
EJB 2.X SESSION BEAN
EJB 2.X DEPLOYMENT DESCRIPTOR<!-- … à!<enterprise-beans>!  <session>!       <display-name>BankSB</display-name>!       <e...
EJB 2.X CLIENT VIEWtry {!!   Context ctx = new InitialContext();!   BankLocalHome home = (BankLocalHome)       !ctx.lookup...
J2EE #fail         #fail             EJB                 #fail
DEVELOPER PRODUCTIVITY                      WHAT IF?          Faster Start-Up Times	                     80% Less Configura...
JAVA EE 5¡ R esource injection in JEE5  §  @EJB, @Resource, @PersistenceContext,  §  @PersistenceUnit¡ I nto Container...
Java EE 6
EJB 3.1 SESSION BEAN                       OPTIONAL!
JAVA EE 6 DEPLOYMENT DESCRIPTOR
EJB 3.1 CLIENT VIEW@EJB BankLocal bank;!!public void makeDeposit() !{!   bank.deposit(2500.00, new Account(12345));!}!
HOW DID THEY DO THAT?¡ C onfiguration by exception with sensible   defaults  §  Security permissions defaults to UNCHECK...
EASE-OF-USE IMPROVEMENTS¡  Optional Local Interface¡  Simplified Packaging¡  EJB-Lite¡  Portable JNDI Naming¡  Simple...
Loose CouplingSTRONG TYPING
DEPENDENCY INJECTION         IN TWO PARTSDI (@Inject)    CDIJSR 330         JSR 299javax.inject!   javax.enterprise.contex...
INJECTION 101public class StatusUpdater {!!   @Inject!   private UrlShortener shortener;!!   public void post (String user...
WHAT MAKES CDI UNIQUE? STANDARD TYPE SAFEEXTENSIBLE
QUALIFIED INJECTION OF               RESOURCES@Path(“/items”) @ManagedBean!                       Strong Typingpublic clas...
DEFINING THE QUALIFIER!@Qualifier!@Retention(RUNTIME)!@Target({FIELD, TYPE, METHOD, PARAMETER})!public @interface NumberOf...
DEFINING THE BEANS@NumberOfDigits(Digits.EIGHT)!public class IssnGenerator implements NumberGenerator {!!   public String ...
CDI - EXTENSIBLE BY DESIGN¡ M any community projects of extensions:  § Seam 3, CODI, Cambridge Technology Partners¡ The...
Servlet Container   vs.   Java EE6 (After lots of   tweaking)
DEVELOPER PRODUCTIVIT Y                             - WHAT IF?          Faster Start-Up Times	                     80% Les...
ISN’T JAVA EE TOO SLOW & FAT?¡  Startup Times w/ an Application  Deployed §  JBoss AS 7.10 ~ 2 seconds §  GlassFish v3 ...
MEMORY COMPARISON
JAVA EE 5
JAVA EE 6
JAVA EE 6 SPECIFICATION     No Where in the   Specification does it       mention thatApp Servers must be slow      and co...
DEVELOPER PRODUCTIVIT Y                             - WHAT IF?                                                            ...
Start up CostsGotchasIntegration Details
I need one ofthose widgets for   a marketing                    T YPICAL DEVELOPER  meeting in an      hour.              ...
CARVE OUT A PROJECTWORK IT INTO SHAPE
Let’s get started
JAVA EE IN MINUTES
FORGE LEVERAGES FACETS & PLUGINS                   Project      Java Facet    Web Facet         X Facet       Plugin A    ...
Demonstration of Forgeand Java EE Application
GETS YOU                                         STARTEDHandles details, gives you perspective   QUICKLY                  ...
TESTING JAVA EE USED TO BE         DIFFICULT
MANY STEPS REQUIRED FOR MODIFYING        CODE PRODUCTIVELY
ARQUILLIAN REMOVES THE STEPS
ARQUILLIAN
ARQUILLIAN REMOVES THE STEPS      SEE MORE AT   コンテナでテストをまわせ!
A powerful programming model.        Less code, greater portability.Optimized for productivity & automation.              ...
¡  Max Andersen  §  “See Context & Dependency Injection from Java EE 6 in      Action”  §  http://www.slideshare.net/ma...
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Upcoming SlideShare
Loading in …5
×

Developer Productivity with Forge, Java EE 6 and Arquillian

3,534 views

Published on

Presentation given at JavaOne Tokyo 2012 about the innovations in Java EE 6, JBoss Forge, Arquillian.

Published in: Technology
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2F4cEJi ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Developer Productivity with Forge, Java EE 6 and Arquillian

  1. 1. RAPID JAVA Using APPLICATION JBoss Forge, Arquillian & Java EE 6DEVELOPMENT Ray Ploski Director, Developer Programs & Strategy JBoss, by Red Hat, Inc.
  2. 2. DEVELOPER PRODUCTIVITY - WHAT IF? Faster Start-Up Times 80% Less Configuration ? 50% Less Code Open eco-system 25% Less Classes Vendor Agnostic Rapid Application Tooling Easier Integration Testing * Based on a Sample POJO/JPA/REST Based Application
  3. 3. GREAT !!!
  4. 4. J2EE #fail #fail EJB #fail
  5. 5. PURPOSE OF THIS TALK¡  Demonstrate productivity gains §  Less Code, Classes and Configuration¡  Address Concerns §  About Java EE, EJBs, App Servers & Lock-in¡  Introduce new innovations §  JBoss Forge §  CDI and Apache DeltaSpike §  Arquillian
  6. 6. J2EE 1.4
  7. 7. EJB 2.X SESSION BEAN
  8. 8. EJB 2.X DEPLOYMENT DESCRIPTOR<!-- … à!<enterprise-beans>! <session>! <display-name>BankSB</display-name>! <ejb-name>BankBean</ejb-name>! <local-home>com.advocacy.legacy.ejb.BankLocalHome</local-home>! <local>com.advocacy.legacy.ejb.BankLocal</local>! <ejb-class>com.advocacy.legacy.ejb.BankBean</ejb-class>! <session-type>Stateless</session-type>! <transaction-type>Container</transaction-type>! </session>!</enterprise-beans>!<assembly-descriptor>! <container-transaction>! <method>! <ejb-name>BankSB</ejb-name>! <method-name>*</method-name>! </container-transaction>!</assembly-descriptor>!
  9. 9. EJB 2.X CLIENT VIEWtry {!! Context ctx = new InitialContext();! BankLocalHome home = (BankLocalHome) !ctx.lookup(“java:comp/env/ejb/bank”);! BankLocal bank = home.create();! bank.deposit(2500.00, new Account(12345)); !} catch (Exception ex) {!! // …!}!
  10. 10. J2EE #fail #fail EJB #fail
  11. 11. DEVELOPER PRODUCTIVITY WHAT IF? Faster Start-Up Times 80% Less Configuration ? 50% Less Code Open eco-system 25% Less Classes Vendor Agnostic Rapid Application Tooling Easier Integration Testing * Based on a Sample POJO/JPA/REST Based Application
  12. 12. JAVA EE 5¡ R esource injection in JEE5 §  @EJB, @Resource, @PersistenceContext, §  @PersistenceUnit¡ I nto Container Components: § Servlets, JSF backing beans and other EJBs¡ P rogress but still Problems §  No POJOs §  Cannot inject DAOs or helper classes that were not written as EJBs §  Hard to integrate anything but strictly business components
  13. 13. Java EE 6
  14. 14. EJB 3.1 SESSION BEAN OPTIONAL!
  15. 15. JAVA EE 6 DEPLOYMENT DESCRIPTOR
  16. 16. EJB 3.1 CLIENT VIEW@EJB BankLocal bank;!!public void makeDeposit() !{! bank.deposit(2500.00, new Account(12345));!}!
  17. 17. HOW DID THEY DO THAT?¡ C onfiguration by exception with sensible defaults §  Security permissions defaults to UNCHECKED §  Transaction type defaults to CONTAINER §  Transaction attribute defaults to REQUIRED¡ U se Annotations §  To choose explicitly (recommended) §  To override defaults¡ D eployment descriptor is no longer required §  But can override above configurations
  18. 18. EASE-OF-USE IMPROVEMENTS¡  Optional Local Interface¡  Simplified Packaging¡  EJB-Lite¡  Portable JNDI Naming¡  Simple Component Testing
  19. 19. Loose CouplingSTRONG TYPING
  20. 20. DEPENDENCY INJECTION IN TWO PARTSDI (@Inject) CDIJSR 330 JSR 299javax.inject! javax.enterprise.context! ! Alternatives!@Inject! Producers!@Named! Scopes!@Singleton! Stereotypes!@Qualifier! Decorators!@Scope! Extensions!
  21. 21. INJECTION 101public class StatusUpdater {!! @Inject! private UrlShortener shortener;!! public void post (String username, String status) {! !String sStatus = shortener.shortenUrls(status);! !System.out.println(username + “ said “ + sStatus);! }!!}! !
  22. 22. WHAT MAKES CDI UNIQUE? STANDARD TYPE SAFEEXTENSIBLE
  23. 23. QUALIFIED INJECTION OF RESOURCES@Path(“/items”) @ManagedBean! Strong Typingpublic class ItemRestService {! No Strings! @Inject @NumberOfDigits(Digits.EIGHT)! private NumberGenerator numberGenerator;! …!}!!!@WebServlet(urlPatterns = “/itemServlet”)!public class ItemServlet extends HttpServlet {!! @Inject @NumberOfDigits(Digits.THIRTEEN)! private NumberGenerator numberGenerator;! …! Loose Coupling}! No Reference to Implementation
  24. 24. DEFINING THE QUALIFIER!@Qualifier!@Retention(RUNTIME)!@Target({FIELD, TYPE, METHOD, PARAMETER})!public @interface NumberOfDigits {!! !Digits value();!!}!!public enum Digits {! !TWO, EIGHT, TEN, THIRTEEN!!}!!
  25. 25. DEFINING THE BEANS@NumberOfDigits(Digits.EIGHT)!public class IssnGenerator implements NumberGenerator {!! public String generateNumber() {! return “8-” + nextNumber();! }!! // …!}!!@NumberOfDigits(Digits.THIRTEEN)!public class IsbnGenerator implements NumberGenerator {!! public String generateNumber() {! return “13-84356-” + nextNumber();! }!! // …!}!
  26. 26. CDI - EXTENSIBLE BY DESIGN¡ M any community projects of extensions: § Seam 3, CODI, Cambridge Technology Partners¡ These multiple projects merging to deliver a vendor-neutral open ecosystem for extensions named DeltaSpike .¡  Hosted on Apache. Works on all Java EE 6 servers + + CDISource DeltaSpike
  27. 27. Servlet Container vs. Java EE6 (After lots of tweaking)
  28. 28. DEVELOPER PRODUCTIVIT Y - WHAT IF? Faster Start-Up Times 80% Less Configuration ? 50% Less Code Open eco-system 25% Less Classes Vendor Agnostic Rapid Application Tooling Easier Integration Testing * Based on a Sample POJO/JPA/REST Based Application
  29. 29. ISN’T JAVA EE TOO SLOW & FAT?¡  Startup Times w/ an Application Deployed §  JBoss AS 7.10 ~ 2 seconds §  GlassFish v3 ~ 4 seconds §  Tomcat 6 + Spring ~ 4 seconds § Java EE 6 War File < 100kb
  30. 30. MEMORY COMPARISON
  31. 31. JAVA EE 5
  32. 32. JAVA EE 6
  33. 33. JAVA EE 6 SPECIFICATION No Where in the Specification does it mention thatApp Servers must be slow and complex.
  34. 34. DEVELOPER PRODUCTIVIT Y - WHAT IF? 80% Less Configuration Faster Start-Up Times ? Open eco-system 50% Less Code 25% Less Classes Vendor Agnostic Rapid Application Tooling Easier Integration Testing * Based on a Sample POJO/JPA/REST Based Application
  35. 35. Start up CostsGotchasIntegration Details
  36. 36. I need one ofthose widgets for a marketing T YPICAL DEVELOPER meeting in an hour. NIGHTMARE
  37. 37. CARVE OUT A PROJECTWORK IT INTO SHAPE
  38. 38. Let’s get started
  39. 39. JAVA EE IN MINUTES
  40. 40. FORGE LEVERAGES FACETS & PLUGINS Project Java Facet Web Facet X Facet Plugin A Plugin B ... Plugin X
  41. 41. Demonstration of Forgeand Java EE Application
  42. 42. GETS YOU STARTEDHandles details, gives you perspective QUICKLY … and time HANDLES “GOTCHAS” ADDS & ACTIVATES TECH VIA PLUGINS
  43. 43. TESTING JAVA EE USED TO BE DIFFICULT
  44. 44. MANY STEPS REQUIRED FOR MODIFYING CODE PRODUCTIVELY
  45. 45. ARQUILLIAN REMOVES THE STEPS
  46. 46. ARQUILLIAN
  47. 47. ARQUILLIAN REMOVES THE STEPS SEE MORE AT コンテナでテストをまわせ!
  48. 48. A powerful programming model. Less code, greater portability.Optimized for productivity & automation. CDI and Forge plugins.Absolutely. You saw it first hand.
  49. 49. ¡  Max Andersen §  “See Context & Dependency Injection from Java EE 6 in Action” §  http://www.slideshare.net/maxandersen/see-context- dependency-injection-from-java-ee-6-in-action¡  Pete Muir REFERENCES §  “CDI in Action”¡ Andrew Lee Rubinger §  “The Death of Slow” §  http://www.slideshare.net/ALRubinger/devoxx-2011- jboss-as7-death-of-the-slow¡ B ert Ertman §  EJB 3.1 §  http://www.slideshare.net/stephanj/ejb-31-by-bert- ertman¡  Antonio Goncalves §  “To inject or not to inject: CDI is the question” §  http://www.slideshare.net/agoncal/to-inject-or-not-to-inject-cdi-is-the- question

×