Java EE 101
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Java EE 101

on

  • 3,424 views

With a strong focus on annotations, minimalist configuration, intelligent defaults and Java centric type-safety, Java EE is one of the most productive development platforms around. ...

With a strong focus on annotations, minimalist configuration, intelligent defaults and Java centric type-safety, Java EE is one of the most productive development platforms around.

This code centric session is a quick tour of the Java EE platform as it stands today.
We will cover key APIs like JSF, CDI, EJB 3, JPA, JAX-RS, WebSocket and JMS using a realistic end-to-end application.

We will also briefly take a look at the emerging horizons of Java EE 8.

Statistics

Views

Total Views
3,424
Views on SlideShare
3,340
Embed Views
84

Actions

Likes
4
Downloads
140
Comments
0

2 Embeds 84

http://pec-local.swe.nec.co.jp 77
https://twitter.com 7

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Java EE 101 Presentation Transcript

  • 1. Java EE 101 Reza Rahman Java EE/GlassFish Evangelist reza.rahman@oracle.com @reza_rahman
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public2 Program Agenda  Java EE Overview  API Overview  Cargo Tracker Demo  Looking Ahead
  • 3. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public3 Java EE Past, Present and Future J2EE 1.3 CMP, Connector Architecture J2EE 1.4 Web Services Mgmt, Deploymen t, Async Connector Java EE 5 Ease of Development , EJB 3.0, JPA, JSF, JAXB, JAX- WS, StAX, SAAJ Java EE 6 Pruning, Extensibility Ease of Dev, CDI, JAX- RS Web Profile Servlet 3.0, EJB 3.1 Lite Java EE 7 JMS 2, Batch, Concurrency, JSON, TX Interceptor, WebSocket Web Profile JAX-RS 2.0 J2EE 1.2 Servlet, JSP, EJB, JMS, RMI
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public4 Java EE Today
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public5 Java EE Today Core Principles  Open vendor neutral technical standard  Stable core for a vibrant ecosystem  Fully integrated runtime, intelligent defaults and convention-over- configuration  Non-redundant APIs with specialized roles  Java centric – strong static typing, strongly Object Oriented, focused on simplicity, strongly backwards compatible
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public6 Java EE Today What it is Not  No XML hell  No configuration hell  No jar/dependency hell  No feature bloat  No snake-oil/hypeware  No bloated deployments  No lock-in
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public7 Java EE JCAJCA JACCJACC EJB 3EJB 3 ServletServlet JSFJSF JAX-RSJAX-RS JMSJMS JTAJTA ELEL JASPICJASPIC CDICDIJPAJPA UpdatedMajor Release New Concurrency Utilities Concurrency Utilities Batch ApplicationsBatch Applications Java API for JSON Java API for JSON Java API for WebSocket Java API for WebSocket JavaMailJavaMail JAX-WSJAX-WS JAXBJAXB BeanValidationBeanValidation
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public8 JSF  Abstract, high-level web framework  True MVC, component oriented, productive  Facelets for view – XHTML – Templating – Composite components  Data, event binding to CDI via EL  Validation, conversion, navigation, flow  Supports AJAX, HTML 5  Strong plug-in ecosystem – PrimeFaces, RichFaces, ADF Faces
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public9 JSF API  Facelets tags – <ui:composition>, <ui:define>, <ui:insert>, <ui:component>, <ui:repeat>  HTML tags – <h:form>, <h:inputText>, <h:selectOneMenu>, <h:commandButton>, <h:commandLink>, <h:panelGrid>  Core tags – <f:convert...>, <f:validat...>, <f:ajax>  Event/data binding to CDI via EL – <h:inputText … value=“#{hello.name}” …>  CDI Scopes – @ViewScoped, @FlowScoped
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public10 CDI  Next generation type-safe dependency management  Robust contextual model  Interceptors/decorators  Type-safe events  Portable extensions API to integrate third-party tools and frameworks cleanly to Java EE – DeltaSpike, Seam 3, Forge  Improving testability – Arquillian
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public11 CDI API  Basic dependency injection – @Inject, @Qualifier, @Stereotype, @Alternative, @Named, @Produces, @Disposes  Context management – @RequestScoped, @SessionScoped, @ConversationScoped, @ApplicationScoped, @Scope (@FlowScoped, @ViewScoped, @TransactionScoped)  Lightweight events – Event, @Observes  Interceptors/decorators – @Interceptor, @InterceptorBinding, @AroundInvoke, @Decorator, @Delegate  Portable extensions SPI
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public12 EJB 3  Enterprise service components – Thread-safe, transactional, pooled  Lightweight, portable, testable, POJO based  Component types – @Stateless, @Stateful, @Singleton, @MessageDriven  Declarative services – @TransactionAttribute (CDI/JTA @Transactional), @RolesAllowed, @RunAs, @Asynchronous, @Schedule, @Lock, @Remote
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public13 JPA  ORM mapping/domain modeling  CRUD EntityManager API  Rich query capabilities – JPQL – Criteria Queries – Native Queries – Stored procedures  Caching
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public14 JPA API  Domain modeling – @Entity, @Embeddable, @OneToOne, @OneToMany, @ManyToOne, @ManyToMany, @ElementCollection, @Id  Relational mapping – @Table, @Column, @JoinColumn, @JoinTable, @Basic, @Lob, @Temporal, @Enumerated, @Cacheable  CRUD API – EntityManager, Query, CriteriaQuery, @PersistenceContext, @NamedQuery, @NamedNativeQuery, @NamedStoredProcedureQuery
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public15 Bean Validation  Declarative constraint management across application layers  Constraint – Restriction on a bean, field, property, method parameter, return value – Not null, between 10 and 45, valid email, etc – @Max, @Min, @Size, @NotNull, @Pattern, @Future, @Past – Custom constraints – Evaluated automatically  Integrated with JSF, JPA, CDI, JAX-RS
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public16 JMS 2  Reliable asynchronous messaging API for Java  Point-to-point (queues), publish-subscribe (topic)  Small, powerful API – Message, Destination, Queue, Topic, ConnectionFactory, Connection, Session, MessageProducer, MessageConsumer, JMSContext, JMSProducer, JMSConsumer, MessageListener, @JMSConnectionFactory  Message types – TextMessage, ObjectMessage, BytesMessage, MapMessage, StreamMessage
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public17 JAX-RS 2  REST development API for Java  Server and client  Annotation based, declarative – @Path, @GET, @POST, @PUT, @DELETE, @PathParam, @QueryParam, @Produces, @Consumes  Pluggable and extensible – Providers, filters, interceptors
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public18 Java API for WebSocket  High level declarative API for WebSocket  Both client and server-side  Small, powerful API – @ServerEndpoint, @OnOpen, @OnClose, @OnMessage, @OnError, Session, Remote  Pluggable and extensible – Encoders, decoders, sub-protocols
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public19 Java EE Demo Application http://cargotracker.java.net
  • 20. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public20 Java EE 8  JSON-B  JCache  CDI 2  More CDI/EJB alignment  Security  Action-oriented Web framework/HTML 5 alignment  Cloud, PaaS, multitenancy/SaaS  Configuration, deployment, management, monitoring?  Further pruning?
  • 21. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public21 Java EE 8 Community Survey https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf https://blogs.oracle.com/ldemichiel/entry/results_from_the_java_ee
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public22 Try it Out! http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/promoted/
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public23 Resources  Java EE Tutorials – http://docs.oracle.com/javaee/7/tutorial/doc/home.htm  Digging Deeper – http://docs.oracle.com/javaee/7/firstcup/doc/home.htm – https://glassfish.java.net/hol/ – https://java.net/projects/cargotracker/  Java EE 7 Transparent Expert Groups – http://javaee-spec.java.net  Java EE 7 Reference Implementation – http://glassfish.org  The Aquarium – http://blogs.oracle.com/theaquarium