SlideShare una empresa de Scribd logo
1 de 63
Descargar para leer sin conexión
RAPID JAVA              Using

 APPLICATION              JBoss Forge,
                          Arquillian &
                          Java EE 6
DEVELOPMENT


                              Ray Ploski
      Director, Developer Programs & Strategy
                        JBoss, by Red Hat, Inc.
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
GREAT !!!
J2EE
 #fail
         #fail


             EJB
                 #fail
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
J2EE 1.4
EJB 2.X SESSION BEAN
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>!
EJB 2.X CLIENT VIEW

try {!
!
   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) {!
!
   // …!
}!
J2EE
 #fail
         #fail


             EJB
                 #fail
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
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
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 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
EASE-OF-USE IMPROVEMENTS

¡  Optional Local Interface
¡  Simplified Packaging
¡  EJB-Lite
¡  Portable JNDI Naming
¡  Simple Component Testing
Loose Coupling




STRONG TYPING
DEPENDENCY INJECTION
         IN TWO PARTS
DI (@Inject)    CDI
JSR 330         JSR 299
javax.inject!   javax.enterprise.context!
                !

                Alternatives!
@Inject!        Producers!
@Named!
                Scopes!
@Singleton!
                Stereotypes!
@Qualifier!
                Decorators!
@Scope!
                Extensions!
INJECTION 101

public class StatusUpdater {!
!
   @Inject!
   private UrlShortener shortener;!
!
   public void post (String username, String status) {!
       !String sStatus = shortener.shortenUrls(status);!
       !System.out.println(username + “ said “ + sStatus);!
   }!
!
}!
   !
WHAT MAKES CDI UNIQUE?
 STANDARD
 TYPE SAFE
EXTENSIBLE
QUALIFIED INJECTION OF
               RESOURCES
@Path(“/items”) @ManagedBean!                       Strong Typing
public 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
DEFINING THE QUALIFIER

!
@Qualifier!
@Retention(RUNTIME)!
@Target({FIELD, TYPE, METHOD, PARAMETER})!
public @interface NumberOfDigits {!
!
      !Digits value();!
!
}!
!
public enum Digits {!
      !TWO, EIGHT, TEN, THIRTEEN!
!
}!
!
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();!
   }!
!
   // …!
}!
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
Servlet Container   vs.   Java EE6
 (After lots of
   tweaking)
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
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
MEMORY COMPARISON
JAVA EE 5
JAVA EE 6
JAVA EE 6 SPECIFICATION
     No Where in the
   Specification does it
       mention that
App Servers must be slow
      and complex.
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
Start up Costs
Gotchas
Integration Details
I need one of
those widgets for
   a marketing




                    T YPICAL DEVELOPER
  meeting in an
      hour.




                         NIGHTMARE
CARVE OUT A PROJECT
WORK IT INTO SHAPE
Let’s get started
JAVA EE IN MINUTES
FORGE LEVERAGES FACETS & PLUGINS


                   Project

      Java Facet    Web Facet         X Facet




       Plugin A      Plugin B
                                ...   Plugin X
Demonstration of Forge
and Java EE Application
GETS YOU
                                         STARTED
Handles details, gives you perspective   QUICKLY
                           … and time
                                          HANDLES
                                         “GOTCHAS”




                                          ADDS &
                                         ACTIVATES
                                           TECH
                                            VIA
                                          PLUGINS
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.


                  CDI and Forge plugins.

Absolutely. You   saw it first hand.
¡  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

Más contenido relacionado

La actualidad más candente

DevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to PracticeDevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to PracticeLemi Orhan Ergin
 
Testing and beyond at startups
Testing and beyond at startupsTesting and beyond at startups
Testing and beyond at startupsMona Soni
 
Advanced Codeless Testing for Web Apps
Advanced Codeless Testing for Web AppsAdvanced Codeless Testing for Web Apps
Advanced Codeless Testing for Web AppsPerfecto by Perforce
 
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Bosnia Agile
 
Android voice skill sprint
Android voice skill sprintAndroid voice skill sprint
Android voice skill sprintJim McKeeth
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedElizabeth Quinn-Woods
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges IrelandDavid O'Dowd
 
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)Chen Cheng-Wei
 
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE abile technologies
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?NexSoftsys
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with AndroidStephen Gilmore
 
scbcd 5 preparation guide
scbcd 5 preparation guidescbcd 5 preparation guide
scbcd 5 preparation guideGanesh P
 
Cv dec 28-2018-mohammad-ashfaq
Cv dec 28-2018-mohammad-ashfaqCv dec 28-2018-mohammad-ashfaq
Cv dec 28-2018-mohammad-ashfaqMohammad Ashfaq
 
The top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingThe top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingKacper Gunia
 

La actualidad más candente (19)

DevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to PracticeDevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to Practice
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Testing and beyond at startups
Testing and beyond at startupsTesting and beyond at startups
Testing and beyond at startups
 
Advanced Codeless Testing for Web Apps
Advanced Codeless Testing for Web AppsAdvanced Codeless Testing for Web Apps
Advanced Codeless Testing for Web Apps
 
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
 
Android voice skill sprint
Android voice skill sprintAndroid voice skill sprint
Android voice skill sprint
 
Code metrics in PHP
Code metrics in PHPCode metrics in PHP
Code metrics in PHP
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
 
Java articles
Java articlesJava articles
Java articles
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges Ireland
 
Synergetics On boarding pitch deck
Synergetics On boarding pitch deckSynergetics On boarding pitch deck
Synergetics On boarding pitch deck
 
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
 
Phonegap presentation
Phonegap presentationPhonegap presentation
Phonegap presentation
 
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with Android
 
scbcd 5 preparation guide
scbcd 5 preparation guidescbcd 5 preparation guide
scbcd 5 preparation guide
 
Cv dec 28-2018-mohammad-ashfaq
Cv dec 28-2018-mohammad-ashfaqCv dec 28-2018-mohammad-ashfaq
Cv dec 28-2018-mohammad-ashfaq
 
The top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingThe top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doing
 

Similar a Developer Productivity with Forge, Java EE 6 and Arquillian

Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileElias Nogueira
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewJosh Padnick
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework Rohit Kelapure
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestOnur Baskirt
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads ConferenceIndicThreads
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Vladimir Bacvanski, PhD
 
DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015Anders Lundsgård
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise ApplicationsDaniel Oh
 
BDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteBDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteLasantha Ranaweera
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Javaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learnedJavaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learnedpgt technology scouting GmbH
 

Similar a Developer Productivity with Forge, Java EE 6 and Arquillian (20)

Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 
Codeception
CodeceptionCodeception
Codeception
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads Conference
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
 
DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015DevOps @ Scania - Trust and some code - NFI Testforum 2015
DevOps @ Scania - Trust and some code - NFI Testforum 2015
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
BDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteBDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product Suite
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Web 2.0 Development with IBM DB2
Web 2.0 Development with IBM DB2Web 2.0 Development with IBM DB2
Web 2.0 Development with IBM DB2
 
Javaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learnedJavaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learned
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Developer Productivity with Forge, Java EE 6 and Arquillian

  • 1. RAPID JAVA Using APPLICATION JBoss Forge, Arquillian & Java EE 6 DEVELOPMENT Ray Ploski Director, Developer Programs & Strategy JBoss, by Red Hat, Inc.
  • 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
  • 4. J2EE #fail #fail EJB #fail
  • 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
  • 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. EJB 2.X CLIENT VIEW try {! ! 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. J2EE #fail #fail EJB #fail
  • 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. 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
  • 14. EJB 3.1 SESSION BEAN OPTIONAL!
  • 15. JAVA EE 6 DEPLOYMENT DESCRIPTOR
  • 16. EJB 3.1 CLIENT VIEW @EJB BankLocal bank;! ! public void makeDeposit() ! {! bank.deposit(2500.00, new Account(12345));! }!
  • 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. EASE-OF-USE IMPROVEMENTS ¡  Optional Local Interface ¡  Simplified Packaging ¡  EJB-Lite ¡  Portable JNDI Naming ¡  Simple Component Testing
  • 19.
  • 20.
  • 22. DEPENDENCY INJECTION IN TWO PARTS DI (@Inject) CDI JSR 330 JSR 299 javax.inject! javax.enterprise.context! ! Alternatives! @Inject! Producers! @Named! Scopes! @Singleton! Stereotypes! @Qualifier! Decorators! @Scope! Extensions!
  • 23. INJECTION 101 public class StatusUpdater {! ! @Inject! private UrlShortener shortener;! ! public void post (String username, String status) {! !String sStatus = shortener.shortenUrls(status);! !System.out.println(username + “ said “ + sStatus);! }! ! }! !
  • 24. WHAT MAKES CDI UNIQUE? STANDARD TYPE SAFE EXTENSIBLE
  • 25. QUALIFIED INJECTION OF RESOURCES @Path(“/items”) @ManagedBean! Strong Typing public 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
  • 26. DEFINING THE QUALIFIER ! @Qualifier! @Retention(RUNTIME)! @Target({FIELD, TYPE, METHOD, PARAMETER})! public @interface NumberOfDigits {! ! !Digits value();! ! }! ! public enum Digits {! !TWO, EIGHT, TEN, THIRTEEN! ! }! !
  • 27. 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();! }! ! // …! }!
  • 28.
  • 29. 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
  • 30. Servlet Container vs. Java EE6 (After lots of tweaking)
  • 31. 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
  • 32. 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
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 44.
  • 45.
  • 46. JAVA EE 6 SPECIFICATION No Where in the Specification does it mention that App Servers must be slow and complex.
  • 47. 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
  • 49. I need one of those widgets for a marketing T YPICAL DEVELOPER meeting in an hour. NIGHTMARE
  • 50. CARVE OUT A PROJECT WORK IT INTO SHAPE
  • 52. JAVA EE IN MINUTES
  • 53. FORGE LEVERAGES FACETS & PLUGINS Project Java Facet Web Facet X Facet Plugin A Plugin B ... Plugin X
  • 54. Demonstration of Forge and Java EE Application
  • 55. GETS YOU STARTED Handles details, gives you perspective QUICKLY … and time HANDLES “GOTCHAS” ADDS & ACTIVATES TECH VIA PLUGINS
  • 56. TESTING JAVA EE USED TO BE DIFFICULT
  • 57. MANY STEPS REQUIRED FOR MODIFYING CODE PRODUCTIVELY
  • 60.
  • 61. ARQUILLIAN REMOVES THE STEPS SEE MORE AT コンテナでテストをまわせ!
  • 62. A powerful programming model. Less code, greater portability. Optimized for productivity & automation. CDI and Forge plugins. Absolutely. You saw it first hand.
  • 63. ¡  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