tools coverage for the java ee platform @ silicon valley code camp 2010

25

Upload: arun-gupta

Post on 12-Nov-2014

1.579 views

Category:

Technology


2 download

DESCRIPTION

Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

TRANSCRIPT

Page 1: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Page 2: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

<Insert Picture Here>

Tools Coverage for the Java EE 6 Platform

Ludovic ChampenoisGlassFish

Page 3: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

3

AGENDA

• Java EE 6: Overview And Status

• Tools Support and Demos– In NetBeans, Eclipse, IntelliJ

• Demo 1: Server runtime

• Demo 2: JPA

• Demo 3: JSF2.0

• Demo 4: CDI

• Demo 5: RestFul Services Jax-RS

• Q&A

Page 4: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

4

Java EE 6

• What's New?– Lots of improvements to existing EE 5 APIs– Several New APIs– Web Profile– Pluggability/Extensibility– Dependency Injection

• A Major new release for Java Enterprise Applications– Easier, Smaller, Extensible– GlassFish 3 is the Reference Implementation (and a quality

product...) – GlassFish 3.1 is adding Clustering support

Page 5: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

5

Java EE 6: Fast Uptake within Open Source and Commercial Community

Announced

Available

Page 6: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

6

• EJB 3.1

• JPA 2.0

• Servlet 3.0

• JSF 2.0

• Interceptors 1.1

• JAX-WS 2.2

• JSR-109 1.3

• JSP 2.2

• EL 2.2 JSR-250 1.1

• JACC 1.5 Connectors 1.6

Updated Components

●JAX-RS 1.1 ●CDI 1.0 ●Bean Validation 1.0 ●DI 1.0 ●Managed Beans 1.0●JASPIC 1.1●

• Netbeans

• Eclipse

• IntelliJ

• Complete Support

• Partial Support...

New Components Tools Support?

Java EE 6: New and Updated components

Page 7: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

7

Java EE 6: Impact on Tools

• New APIs are easy to expose:– Libraries in project path. More and more on Maven (EE 6 APIs in

Maven)– Automatic Code completion– JavaDoc: Some IDEs...

• New Concepts:– JSF 2.0: face-config obsolete, ManagedBeans obsolete (->CDI)– JAX-RS– No Web.xml, more annotations

• New Packaging:– EBJ Inside Web Application Projects!– Web Profile versus Full Profile

Page 8: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

8

Java EE 6 : Impact on Tools

• Alignment of Platform changes and the IDEs– Emacs (James Gosling 81), vi (Bill Joy 76): First IDES choice

• Java EE 6 compliant

– NetBeans 6.8: same day as Java EE 6 GlassFish (Dec 2009)

• Almost everything but CDI and advanced JF 2.0 (fixed in 6.9)

– IntelliJ: Same week as Java EE 6

• GlassFish Runtime target Supported in Dec 2009

• Eclipse:– ava EE 6 support June 2010– But GlassFish Plugin with EE 6 support before...– Oracle Enterprise Pack for Eclipse

Page 9: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

9

Oracle Involvement In Java EE 6 And Tools

• Oracle is the main driver of the GlassFish Community– The Java EE 6 Reference Implementation– Production Ready (Clustering, HA,...)

• Oracle is the main driver of the NetBeans Community– Tight coupling with Java SE and EE changes.

• Oracle has many Eclipse Committers– In JPA: EclipseLink Runtime and Dali Tooling– In Core Java EE tooling– In JSF: Most JSF WTP Eclipse tooling done by Oracle folks

• Jboss Tools has their own JSF tooling

– GlassFish and Weblogic support via OEPE

Page 10: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

10

Java EE 6: Oracle Gives Developer Choices

Oracle Enterprise Pack for EclipseTarget WebLogic and GlassFish 3

NetBeans 6.9.1 and Coming 6.10Bundled with GlassFish 3

IntelliJ IDEA has great Java EE 6 Support

Page 11: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

11

Java EE 6 Runtime in Tools:

NetBeans Eclipse IntelliJ

• NetBeans 6.8: same day as Java EE 6 GlassFish

• Eclipse 3.5 WTP GlassFish Plugin for Java EE 6

• IntelliJ 9.0 same week as Java EE 6

• NetBeans 6.9.1 and 7.0 nightlies: complete EE 6 support

• Eclipse 3.6 (June 2010): initial support for Java EE 6, far from being Complete

• GlassFish Plugin bundled• GlassFish Plugin in OEPE and a

dev Update Center• GlassFish Support bundled

• GlassFish Runtime Bundled and Preconfigured

• No bundle at this time, can download the runtime via the plugin

• No Bundle, need separate dowload

• EveryThing works Out of the Box

• Some manual Configurations• Manual Configurations, a bit

difficult

Page 12: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

12

Java EE 6: Working with a GlassFish Server in the Tools.

Page 13: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

13

Java EE 6 Working with Databases

• Via JPA 2.0

• Out of the Box, GlassFish 3 bundles JavaDB– Registered in NetBeans and Eclipse

• All IDEs can register DB Resources and Introspect

• All IDEs can Generate JPA From DB

• All IDEs give decent Mapping Tooling

• Can Start/Stop Dbs only in NetBeans!

• NetBeans has extra Wizards to Generate CRUD JSF2

• NetBeans has better Default in Persistence.xml

• IntelliJ has some ER/UML view and JP/QL Support

Page 14: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

14

Java EE 6 JPA Demo

Page 15: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

15

JSF 2.0

• Faceletes is the foundation– XHTML and tags– Templating

• ui:include, ui:composition, ui:define,...

– Composite Components

• Reusable

• Turn page markup into a JSF UI component

• Managed Beans– Annotations (faces-config is optional)– JSF APIs or– CDI APIs (Preferred)

• CDI support (@Named, @Inject, @SessionScoped,...)

Page 16: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

16

JSF 2.0 Tooling

> > >

• NetBeans and IntelliJ are best– XHTML/Facelet Editor

• Code Completion, Beans navigation

– NetBeans 6.10 bundles Primefaces components– JPA to JSF 2.0 Wizards (only NetBeans)– Create Composite Components automatically

• Eclipse is really lacking the new features with CDI and annotations

Page 17: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

17

Java EE 6 JSF 2.0 Demo

Page 18: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

18

Java EE 6 CDI: Contexts and Dependency Injection

JSF/FaceletsServlets

JSF/Facelets

MDB

Web Services

CDI Container

Managed Bean

Managed Bean

●Dependency injection● Builds on @Inject API

●Context/scope management●Works with multiple bean types●Includes ELResolver●Ejb Session and Singleton

●The CDI Container will● Resolve dependencies● Offer the bean for

Injection

Page 19: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

19

Java EE 6 CDI Tooling

• Should be easy:– Enable CDI in a Module: Create an empty beans.xml file– Use @Inject, @Named, @SessionScoped, @ApplicationScoped

• Only Need EE 6 APIs in Path and Code Completion.

• JavaDoc a Goody

• But in EL (Facelets and JSP): Code Completion?– Not for Eclipse at this moment. Only in NetBeans and IntelliJ

Page 20: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

20

Java EE 6 CDI Demo

Page 21: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

21

JAX-RS

• REST made easy

• Java Annotation Based Resource Creation– Identity of Resources– Self-Descriptive Resources– Navigation between Resources– Representation choices

• CRUD Operations: GET, DELETE, POST, PUT

Page 22: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

22

Java EE 6 Jax-RS and Web Services

• Simple REST Resources Creation

• Advanced Wizards Generating– Only in NetBeans

• Resources from Database

• Resources from Entity Classes

• Resources from Patterns

• JAX-WS:– Service Creation– Testing Web Services: Advantage NetBeans– Eclipse is Axis based

Page 23: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

23

Java EE 6 REST Web Services Demo

Page 24: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010

24

Java EE 6 In IDEs

• IntelliJ http://www.jetbrains.com/idea/

• Eclipse https://glassfishplugins.dev.java.net/

• NetBeans http://netbeans.org/

Page 25: Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010