Improve and Expand JavaServer Faces Technology with JBoss Seam

Similar documents
Ajax and JSF: Natural Synergy

Java EE 6: Develop Web Applications with JSF

Seam. Pete Muir JBoss, a Division of Red Hat.

Seam 3. Pete Muir JBoss, a Division of Red Hat

Introduction to Seam. Pete Muir. JBoss, a division of Red Hat

Seam. Pete Muir JBoss, a Division of Red Hat.

Developing Applications with Java EE 6 on WebLogic Server 12c

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Seam & Web Beans. Pete Muir JBoss, a division of Red Hat.

Migrating traditional Java EE applications to mobile

Eclipse Java Ejb 3.0 Tutorial For Beginners With Examples Pdf

object/relational persistence What is persistence? 5

Oracle Developer Day

Contents at a Glance

<Insert Picture Here> Accelerated Java EE Development: The Oracle Way

Hands-on Development of Web Applications with Java EE 6

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Webservices In Java Tutorial For Beginners Using Netbeans Pdf

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Not just an App. Server

open source community experience distilled

Java Training Center, Noida - Java Expert Program

Java EE 7 is ready What to do next? Peter Doschkinow Senior Java Architect

JBoss Seam. Michael Yuan, PhD Ezee Inc.

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

"Web Age Speaks!" Webinar Series

Comparing Java Web Frameworks

Courses For Event Java Advanced Summer Training 2018

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Java Advance Frameworks

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

Java EE 6 - Update Harpreet Singh GlassFish Portfolio Product Manager

GUJARAT TECHNOLOGICAL UNIVERSITY

Etanova Enterprise Solutions

Contents. 1. JSF overview. 2. JSF example

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Enterprise Java Development using JPA, Hibernate and Spring. Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009

Oracle Fusion Middleware 11g: Build Applications with ADF I

Oracle Developer Day

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

APPLICATION SECURITY ENHANCEMENTS IN JAVA EE 6

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

SOFTWARE DEVELOPMENT SERVICES WEB APPLICATION PORTAL (WAP) TRAINING. Intuit 2007

Specialized - Mastering JEE 7 Web Application Development

Oracle Corporation

JSF 2.0: Insight and Opinion

JBoss Seam and beyond

What s new in Spring Web Flow 2.0

Integrating Seam and GWT

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

ADVANCED JAVA COURSE CURRICULUM

Fast Track to Java EE 5 with Servlets, JSP & JDBC

JSF 2.0: Insight and Opinion

Wednesday, January 25, 12

/ / JAVA TRAINING

Building JavaServer Faces Applications

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

What's New in the Servlet and JavaServer Pages Technologies?

Java Enterprise Edition

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

Oracle Fusion Middleware 11g: Build Applications with ADF I

What is it? What does it do?

This is the first part of a multi-article series. For part 2 please see: Dependency Injection in Java EE 6 - Part 2

JVA-563. Developing RESTful Services in Java

Twelve Reasons To Use NetBeans Software Episode 2

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

Remote Health Service System based on Struts2 and Hibernate

Refactoring to Seam. NetBeans. Brian Leonard Sun Microsystems, Inc. 14o

At present we use several collaboration (web) tools, like SuperB website Wiki SVN Document management system etc.

JVA-163. Enterprise JavaBeans

Introduction to JBoss Seam

CORE JAVA 1. INTRODUCATION

The Next Generation. Prabhat Jha Principal Engineer

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture

Soap Based Web Services In Java Tutorial Eclipse Jboss

TheServerSide.com. Dependency Injection in Java EE 6: Conversations (Part 4) Dependency Injection in Java EE 6 (Part 4) by Reza Rahman

Struts: Struts 1.x. Introduction. Enterprise Application

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

JBoss Seam Integration with intent to use. Dan Allen Software Consultant Author, Seam in Action

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

PGT T3CHNOLOGY SCOUTING. Google Webtoolkit. JSF done right?

Case Study: Big Lots Store Inventory Management

IBM WebSphere Application Server 8. Java EE 6 Feature Packs

1 Markus Eisele, Insurance - Strategic IT-Architecture

Web Application Development Using Spring, Hibernate and JPA

Fast Track to Spring 3 and Spring MVC / Web Flow

Nuxeo Roadmap. From Memphis to Chicago Nuxeo Team

}w!"#$%&'()+,-./012345<ya

Model-based Generic Website Tooling

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER

Java SE7 Fundamentals

TABLE OF CONTENTS CHAPTER TITLE PAGE

Leverage Rational Application Developer v8 to develop Java EE6 application and test with WebSphere Application Server v8

Implementing a Numerical Data Access Service

ADVANCED JAVA TRAINING IN BANGALORE

IBM. IBM WebSphere Application Server Migration Toolkit. WebSphere Application Server. Version 9.0 Release

Transcription:

Improve and Expand JavaServer Faces Technology with JBoss Seam Michael Yuan Kito D. Mann Product Manager, Red Hat Author, JSF in Action http://www.michaelyuan.com/seam/ Principal Consultant Virtua, Inc. 2007 JavaOneSM Conference BOF-4400

Improve and Expand JavaServer Faces Technology with JBoss Seam Learn how JBoss Seam makes developing JavaServer Faces applications easier. 2007 JavaOne SM Conference BOF-4400 1

About Michael Yuan Contributor to JBoss Seam Seam on non-jboss containers Performance analysis Tools integration Samples and demos Author of the JBoss Seam from Prentice Hall First Seam book written by Seam committors Covers Seam 1.2 Available in JavaOne bookstore 2007 JavaOne SM Conference BOF-4400 2

About Kito Mann Author, JavaServer Faces in Action Independent trainer, consultant, architect, mentor Internationally recognized speaker JavaOne SM Conference, JavaZone, TSS Symposium, Javapolis, NFJS, AJAX World, etc. Founder, JSF Central http://www.jsfcentral.com Java Community Process SM (JCP SM ) Member JavaServer Faces 1.2, JavaServer Pages (JSP ) 2.1, Design-Time API for JavaBeans Architecture, Design-Time Metadata for JavaServer Faces Components, WebBeans, etc. Experience with Java platform since its release in 1995, web development since 1993 2007 JavaOne SM Conference BOF-4400 3

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 4

JSF: The Good Fully component-based web framework Event-based UI programming model Great for visual tools support Many free and commercial component libraries Very rich interaction model Many places for external frameworks to plugin Integrated validation / input conversion Unified Expression Language (EL) Multiple rendering output from same pages Non-JSP Template engines available Official Java EE standard 2007 JavaOne SM Conference BOF-4400 5

JSF: The Bad Does not follow the Java EE 5 simplified programming model No special integration with EJB3 Use verbose and repetitive XML instead of annotation Not web friendly HTTP GET and RESTful URLs are hard Use custom Ajax libraries / frameworks is hard Poor exception handling and error page re-direction Dependent on the inadequate Java EE security Hard to test out of container No support for dialogs or conversations 2007 JavaOne SM Conference BOF-4400 6

What is Seam? A lightweight framework for Java EE 5.0 Integrates JSF with EJB3, POJOs, and JPA Corrects problems with pure JSF Makes heavy use of annotations Configuration by Exception Developed by JBoss Open source software released LGPL license Basis of the WebBeans JSR 2007 JavaOne SM Conference BOF-4400 7

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 8

Key Features: Seam is Made for JSF Reduces boilerplate code Dependency bijection No XML Hell Integrated ORM support RESTful URLs and page actions Extensive use of JSF EL Conversations Direct JavaScript integration for AJAX Elegant input validation 2007 JavaOne SM Conference BOF-4400 9

Key Features: Seam is Made for JSF Graceful exception handling Fine-grained security Business process and rules integration Very easy to test Seam Gen 2007 JavaOne SM Conference BOF-4400 10

Reduces Boilerplate Code No JSF backing beans Use transactional components directly on web pages or in other components EJB3 session beans, entity beans, or POJOs Bi-jection of named components Simplified navigation rules Navigate based on state not return string Configuration by exception 2007 JavaOne SM Conference BOF-4400 11

Dependency Bijection Dependency Injection The ability of a container to set object references during (or immediately after) object creation Natively supported by JSF s MBCF Dependency Outjection The ability of an object to expose objects to the container after a method has been executed Supported only in Seam Dependency Bijection Injection + Outjection 2007 JavaOne SM Conference BOF-4400 12

The web page Named entity bean to back data fields in JSF forms Named session to back JSF actions; Dependency bijection 2007 JavaOne SM Conference BOF-4400 13

The web page Named entity bean to back data fields in JSF forms Named session to back JSF actions; Dependency bijection 2007 JavaOne SM Conference BOF-4400 14

The web page Named entity bean to back data fields in JSF forms Named session to back JSF actions; Dependency bijection 2007 JavaOne SM Conference BOF-4400 15

No XML Hell Do not use XML for code XML is used for the following scenarios Configure the framework components Configure web page parameters and actions Configure business processes and pageflows 2007 JavaOne SM Conference BOF-4400 16

Integrated ORM Support Integrated support for Open Session in View pattern Can keep database session open during conversations Stateless DAOs close the database session when the page rendering starts in the view layer Seam is invented by Gavin King, the father of Hibernate 2007 JavaOne SM Conference BOF-4400 17

Integrated ORM Support Automatic transaction rollback Based on outcome or exceptions Lazy loading is essential for ORM performance Seam just works with lazy loading No need for DTOs (Data Transfer Objects) between layers Seam is invented by Gavin King, the father of Hibernate 2007 JavaOne SM Conference BOF-4400 18

RESTful Web Apps Inject HTTP GET parameters directly to Seam components before loading the page Invoke arbitrary Seam methods when the page is loaded Seam s JSF tags (e.g., <s:link>) can render into direct HTTP GET links 2007 JavaOne SM Conference BOF-4400 19

Expand JSF EL Expand the EL syntax Expand the EL usage Web pages Annotation parameters XML configuration files TestNG test scripts 2007 JavaOne SM Conference BOF-4400 20

Conversations More finely grained than HTTP session Support web transaction Support multiple browser windows/tabs Support BACK buttons Great for wizards, shopping carts, etc. 2007 JavaOne SM Conference BOF-4400 21

DEMO Hotel bookings demo 2007 JavaOne SM Conference BOF-4400 22

Seam and Ajax Use Ajax JSF components Use Ajax4jsf to wrap regular JSF components Use Seam Remoting to directly access Seam components from JavaScript Dojo integration GWT integration 2007 JavaOne SM Conference BOF-4400 23

Elegant input validation Use Hibernate validators on the data model to validate input fields Decorate the invalid fields Ajax validation supported out of the box 2007 JavaOne SM Conference BOF-4400 24

DEMO Ajax4jsf and GWT demos 2007 JavaOne SM Conference BOF-4400 25

Failing Gracefully Redirect any Exception to any page Configure error pages on a per-page basis Redirect to previous page after login exceptions 2007 JavaOne SM Conference BOF-4400 26

Fine-grained Security Username / password authentication Authenticate against any backend Any authentication logic in Java code Finely-grained access control Web pages Components on a web page Java Methods Rule-based instance-level access control 2007 JavaOne SM Conference BOF-4400 27

Protect a web page The web page Authentication logic Declare protected pages 2007 JavaOne SM Conference BOF-4400 28

Role-based Access Control Page only accessible to users with the admin role Add roles for each user Page element restricted to admin users 2007 JavaOne SM Conference BOF-4400 29

Business Process and Rules Manage long-lived objects in the process stateful scope Map business process actors and actions to web actions via JSF EL Integration with JBoss Rules 2007 JavaOne SM Conference BOF-4400 30

Seam Testing Framework TestNG based framework Mock database sessions for easy unit tests Mock the entire JSF interaction cycle for full test scripts Data binding in test via JSF EL 2007 JavaOne SM Conference BOF-4400 31

Seam Gen Ruby-on-Rails like application generator CRUD app for complex inter-related tables Ajax, security, and REST support built in Comprehensive tools support ANT command line Eclipse integration NetBeans integration Come to BOF 4400 next for cool Seam Gen demos! 2007 JavaOne SM Conference BOF-4400 32

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 33

Other Goodies Template-based PDF output from JSF / Facelets pages Template-based email output Data Binding API CRUD framework Spring integration Enhanced Date/Time selector UI widget Correct JSF timezone issues Partial page cache 2007 JavaOne SM Conference BOF-4400 34

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 35

Application Requirements Requires JDK 1.5 Servers: Tomcat 5.5 Supports EJB3 in plain Tomcat via the JBoss Microcontainer Glassfish JBoss 4.0.5+ or 5.0 beta WebLogic 9 WebSphere 6 J2EE 1.4 servers require use of POJOs for backing beans instead of EJB session beans 2007 JavaOne SM Conference BOF-4400 36

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 37

Future Directions Enhancements to the security framework Better tools integration for Eclipse and NetBeans Seam/WS Integration with EJB3 web services ESB and SOA integration Better portlet support Performance improvments WebBeans JSR Portions will be part of JSF 2.0 2007 JavaOne SM Conference BOF-4400 38

Agenda What is Seam? Key Seam Features Other Goodies Application Requirements Future Directions Summary 2007 JavaOne SM Conference BOF-4400 39

Summary Seam is made for JSF Lightweight Java EE framework Enhances and extends JSF No backing beans required Conversations Bijection Integrated ORM support Testing framework Seam Gen 2007 JavaOne SM Conference BOF-4400 40 A2-40

Resources Official Seam site http://www.jboss.com/products/seam JSFCentral http://www.jsfcentral.com Michael Yuan s blog http://www.michaelyuan.com 2007 JavaOne SM Conference BOF-4400 41 A2-41

Q&A Michael Yuan Product Manager, Red Hat http://www.michaelyuan.com/seam/ Kito D. Mann Author, JSF in Action Principal Consultant Virtua, Inc. 2007 JavaOne SM Conference BOF-4400 42