J2EETM Development
with NetBeans

Petr Jiricka

Agenda

Overview of J2EE technologies

Sun J2EE software

Prague Engineering Center

Overview of NetBeans

NetBeans 4.0: Web Tier support

NetBeans 4.1: Enterprise JavaBeansTM and Web Services

Future directions of J2EE

J2EE Overview

Platform for developing and deploying complex enterprise applications

One of two most successful platforms

Developed in Java Community Process (JCP)

1.4 is the current version, 5.0 (1.5) in progress

Specification, Reference Implementation, Technology Compatibility Kit (TCK)

Implemented by multiple vendors

Sun, BEA, Oracle, IBM, Apache, JBoss, ...

J2EE Technologies

Major technologies

Servlets

JavaServer PagesTM

Enterprise JavaBeansTM

Web Services, JAX-*

JDBC

JNDI

JMS

JavaMail

...

Related technologies and products

JavaServer Faces (JSF)

JavaServer Pages Standard Tag Library (JSTL)

Portlets

Naming and directory management, LDAP

Identity management, Liberty alliance

...

Additional aspects of J2EE

Multiple types of clients

Transactions

Security, authentication, authorization

Data persistence

Distribution

Integration with existing systems

Internationalization and localization

Clustering, scalability, high availability

Challenges of J2EE development

Learning many different technologies

Use of multiple languages (Java, JSP, XML, SQL, EJB-QL, ...)

Teamwork

Many aspects of development

Performance, making it efficient

“One size does not fit all”

Making J2EE development easier

Sample code

Tutorials

Reference architectures

Frameworks

Books

Simplify core specifications

Tools

Sun Java Enterprise System

Integrated set of products

Application Server

Web Server

Naming and Directory Server

Portal Server

Identity Server

...

Sun Java System Application Server

Several editions

Platform Edition

Standard Edition

Enterprise Edition

Latest version is 8.0 (Platform Edition)

Supports J2EE 1.4

8.1 under development, beta is released

FREE for both development and deployment!

J2EE Developer Resources

Sun Java Developer Tools

NetBeans

FREE

Supports J2SE, J2EE web tier

Will support full J2EE soon

Integrated with SJS Application Server Platform Edition

Sun Java Studio Creator

Visual development of web applications

Natively supports JavaServer Faces

Affordable: only 100$/year/developer, free evaluation

Built on NetBeans

Sun Java Developer Tools (cont'd)

Sun Java Studio Enterprise

High end tool

Supports UML, team collaboration features

Integrated with Sun Java Enterprise System

Built on NetBeans

NetBeans Mobility Pack

J2ME (MIDP) development

Will support J2ME web services (JSR 172)

Prague Engineering Center

Several engineering teams

NetBeans

NetBeans Mobility

Java Enterprise System

Globalization

University relations

Prague will GROW

Expand existing teams

New teams in Prague

NetBeans

FREE Java development tool

Open source project

Supports J2SE, J2ME and J2EE

Community contributes bug reports, fixes, new modules, requests new features

NetBeans 4.0

Landmark release

New Project system based on Apache Ant

Support for Java refactoring

Supports J2SE 5.0 release (Tiger)

Other new features

Improved UI (window system)

Performance enhancements, UI responsiveness

Breaking news: NetBeans 4.0 RC2 has been released. Final version will be out soon! Breaking news: NetBeans 4.0 RC2 has been released. Final version will be out soon! Breaking news: NetBeans 4.0 RC2 has been released. Final version will be out soon!

Web Development with NetBeans 4.0

Web Application project type

Supports J2EE 1.3 and 1.4

Integrates with the bundled Tomcat 5 server

Integrates with SJS Application Server 8, Platform Edition (separate download)

All stages of the development cycle

Create, Edit, Build, Deploy, Debug

Web Development – Create

Create projects

Web Application project from scratch

Web Application project with existing sources

Web Application project with existing Ant script

Create components

JSP pages, HTML pages, servlets, tag files, tag libraries, filters, listeners, ...

Manage deployment descriptor automatically

Includes JSP Standard Tag Library (JSTL)

Web Development – Edit

JSP Editor

Coloring of HTML, JSP, Java and Expression Language elements

Context-sensitive code completion

Help for JSP syntax

Formatting, tag matching, “smart case”, ...

Similar features also for Tag Files

Java editor aware of J2EE APIs

Code completion for deployment descriptors

Web Development – Build

Build is completely driven by Ant

Ant script automatically maintained by the Project system

Respects common conventions

“build” and “dist” directories

Jakarta and Java BluePrints source structures

Compile JSPs to discover coding errors

Web Development – Deploy

Tomcat 5 included with NetBeans

One-click deployment

Fast iterative redeployment

View server logs

Web Development – Debug

Automatically start server in debug mode

Step through Java and JSP code

Evaluate expressions (as tooltips)

HTTP monitor

Records all HTTP transactions between the browser and the server

Displays HTTP parameters, cookies, session data, HTTP headers, browser and server info, ...

Allows replay ing transactions recorded previously

Demo – NetBeans 4.0

NetBeans 4.1

Complete J2EE development support

Enterprise JavaBeansTM

Web Services

Will support J2EE 1.4

Will integrate with SJS Application Server 8.1, Platform Edition

From the

Computer History Museum

in Santa Clara, California

NetBeans 4.1 Goals

Make it easier to develop J2EE applications

Make experienced developers more productive

Help beginners learn J2EE development

Do not require in-depth knowledge of all details of J2EE

Help by providing ent-to-end support, integrated experience

Out Of Box Experience (OOBE)

J2EE in NetBeans 4.1 – basic features

New Project types

EJB Module project

J2EE Application project

Web Services developed in Web project or EJB Module project

Wizards for J2EE components

Enterprise JavaBeansTM Development

Create EJBs

Entity Bean, CMP Entity Beans using an existing database, Session Bean, Message Driven Bean

Automatically manage depl. descriptors

High level operations (add business method)

Visual deployment descriptor editor

“Call EJB” action

Web Services Development

Create Web service operations

From scratch

From an existing Java class

From an existing WSDL file

Automatically manage all configuration files

Supports common web service standards

SOAP, WSDL, JAX-RPC, JSR 109, ...

More J2EE features

Verification of J2EE applications

Manage and edit server-specific deployment descriptors

Refactoring integrated with J2EE

Java BluePrints solution catalog

Sample J2EE projects

NetBeans 4.1 Schedule

Early Access 1 was released in October 2004

Early Access 2 in January 2005

Beta in Q1 CY2005

Final version in 1st half of 2005

Demo – NetBeans 4.1

The Future of J2EE

J2EE 5.0 (1.5) will be the next major release

Extensive use of annotations (JSR 175, introduced in J2SE 5.0)

Enhancements in

CMP beans

New Web Services standards

Align JSP and JSF

...

Enterprise JavaBeansTM in J2EE 5.0

EJB 3.0 (JSR 220) – early draft released

Annotations

@Stateful public class CartBean implements ShoppingCart {

Annotations replace deployment descriptors

EJBs are Plain Old Java Objects (POJO)

EJB QL enhancements

Enhanced Object-Relational mapping

New APIs for entity beans

javax.ejb.EntityManager, javax.ejb.Query

Web Services in J2EE 5.0

JAX-RPC 2.0

Improved binding of Java data types to XML

Built on top of JAXB 2.0

JAXB 2.0 (Java API for XML Binding)

Fast Web Services

Use of binary encoding of SOAP messages

Annotations for Web Services (JSR 181)

Web Services Security, digital signatures, ...

Web tier technologies in J2EE 5.0

Align JSP and JSF

JSP 2.1 and JSF 1.2

Align expression languages

${JSP Expression}

#{JSF Expression}

Use managed beans in JSP

Links

http://java.sun.com/j2ee/index.jsp

J2EE main page, downloads of J2EE SDK (aka SJS Application Server 8.0 PE), samples, API docs, J2EE Blueprints, ...

NetBeans community mailing lists

www.netbeans.org - NetBeans

nbusers@netbeans.org – general user questions

nbj2ee@netbeans.org – questions about J2EE devt.

Prague Engineering Center

www.sun.cz

Q & A

J2EETM Development
with NetBeans

Petr Jiricka

Backup slides

J2SETM 5.0 “Tiger”

There's lots of great stuff in Tiger

JMX

Concurrency utilities

Generics

Ocean L&F

extended for loop

JVM Monitoring

metadata

SAX 2.0

Enumerated types

printf

importing constants

Autoboxing

Unicode Surrogates

Remote JMX

DOM 3

Gnome Skins

XML Schema

JVMPI Profiling

Stack trace API

JVM sharing

XAWT

AMD64

performance

faster startup

improved footprint

BigDecimal updates

JDBC Rowsets

SASL

New Memory Model

Packed JARs

performance ergonomics

jps

jstat

varargs

apt

fatal error handlers

jconsole

OpenGL

synth L&F

improved cookie support

RMI dynamic proxies

z-ordering

swing printing

OCSP

XDnD

IP reachability

unsynchronized StringBuffer

scanning

And lots more...

Petr Jiricka

2003-07-29T14:25:34

Petr Jiricka