Transcript Slide 1

www.devoxx.com

JSF on Rails – JDeveloper 11g, ADF 11g and JHeadstart

Lucas Jellema Expertise Manager AMIS (The Netherlands) www.devoxx.com

Overall Presentation Goal

Demonstrate the rapid, declarative development of Rich Internet Applications (EJB/JPA or ADF Business Components, JavaServer Faces) using JDeveloper 11g & ADF 11g and the “warp-speed” on-rails model driven development using JHeadstart 11g (entice you to try it out for yourself) www.devoxx.com

Speaker’s qualifications

Lucas Jellema is CTO at AMIS – an Oracle, SOA & Java specialist in The Netherlands Lucas Jellema is Oracle ACE Director Lucas Jellema regularly writes articles for media like JDJ, Java Magazine (Dutch), JavaLobby, Oracle Technology Network, and various Oracle related magazines Lucas Jellema presented in 2008 on Dutch Java User Group conference, JavaOne, Oracle Open World, Devoxx and various Oracle User Group events Lucas Jellema makes frequent contributions to the http://technology.amis.nl/blog weblog 4 www.devoxx.com

Java developers spend most of their time on solving non functional problems that have already been solved: • In other technology stacks • In existing Java frameworks, libraries or tools • By their (former) colleagues • And sometimes even by themselves Over 90% of developer effort can be and should be oriented towards functional business requirements No focus and little effort on programming generic plumbing code or developing functionality available from frameworks Exploit declarative, predefined options in your technology stack and start programming in anger to go the ‘extra mile’ www.devoxx.com

Overview

Demo: JEE Application Development – EJB 3.0/JPA & JSF using JDeveloper 11g with ADF 11g Discussion of remaining challenges Introduction of JSF on Rails with JHeadstart Demo: Declarative, model-driven, zero-code generation of JEE Applications using JHeadstart Summary 6 www.devoxx.com

JEE Web Application on ADF

ADF = Oracle’s Application Development Framework (rich) JSF implementation (ADF Faces aka MyFaces Trinidad) – as well as ADF Swing and Struts/JSP support its own persistency framework ADF Business Components (fka BC4J) – as well as support for EJB/JPA, EclipseLink/TopLink, WebServices and 3 rd party persistency solutions Infrastructure for Data Binding – to decouple Model and ViewController (and implement rich JSF backing models) 7 Note: each of these elements can be used with or without the others www.devoxx.com

The Data Model for the demo

8 www.devoxx.com

DEMO

Demonstration rapid JEE Web Application Development

JDeveloper 11g with ADF • Business Tier: EJB 3.0/JPA • ADF Model • Web Tier: JavaServer Faces (ADF 11g Faces Rich Client Components) www.devoxx.com

Rapid Demonstration Result

• Step One – Master (table) Detail (table) 10 www.devoxx.com

Rapid Demonstration Result

• Step Two – • Wrap Employee Table in PanelCollection (Detach and run-time Column Management) & • Enable Sort on Employee Table 11 www.devoxx.com

Rapid Demonstration Result

• Step Three – the Real Estate Challenge: • Accordion with Employee Table and Salary Graph • Popup with extra context details (Department Manager) 12 www.devoxx.com

Rapid Demonstration Result

• Master-Detail synchronization • Table-Table • Sort & Column Manipulation • Accordion • Popup • Chart ============ (+ 10 minutes 13 www.devoxx.com

Some Remaining Challenges

Even though a lot of drag & drop, still a lot of manual activity involved Because of that, keeping the pages consistent – look & feel, structure, interactivity – can be a pain Absorb/Apply global changes in either the Model or the layout and interaction structure and pattern is quite hard Implementing common UI patterns – List of Values, Search Forms, Navigation, Breadcrumbs – can be made easier The learning curve is quite steep – even though initially little programming is involved 14 www.devoxx.com

JHeadstart =JSF on Rails

• JHeadstart generates an ADF – JSF application from the model and a declarative definition of pages & data usages • For CRUD + + style applications • or a headstart for process/task oriented applications • Many common data, interaction and layout-patterns are supported with out-of-the-box generation • Master-Detail(-Detail ….), Shuttle, List of Values • Form, Table, Tree, Overflow areas, File upload/download • Menu, Deeplink Navigation, Breadcrumb trail • Run-time management of Resource Bundles and Custom Items • 15 Integrated Role based authorization for pages and items www.devoxx.com

Develop iteratively with JHS

• Preparation • • • • Install JHeadstart extension for JDeveloper Enable JHeadstart on Web application Build (initial) business service with ADF BC Create (default) Application Definition • Generate (initial) application: JSF pages, Page Flows, Managed Beans & Navigation rules, ADF Data Binding • Repeatedly, in iterations • • • • 16 Edit Application Definition [Change Generator Templates] [Modify Model (ADF BC Business Service)] Regenerate www.devoxx.com

DEMO

Demonstration JEE Web Application Development on Rails - Introducing JHeadstart

JDeveloper 11g, ADF & JHeadstart • Business Tier: ADF Business Components • ADF Model • Web Tier: JavaServer Faces (ADF 11g Faces Rich Client Components) www.devoxx.com

JSF on Rails Demo Results

• Menu • Master-Detail • Search Form • Edit/Delete/Duplicate 18 www.devoxx.com

JSF on Rails Demo Results

• Editing the Application Definition 19 www.devoxx.com

JSF on Rails Demo Results

20 www.devoxx.com

Summary

ADF 11g helps create rich JavaServer Faces applications on top of EJB/JPA, WebService or ADF Business Components Business Services ADF 11g Data Binding allow drag & drop style data binding of complex data driven components (form, table, tree, shuttle, many graph types, slider, pivot table, …) ADF 11g Faces (Rich Client Components) provide rich layout components (popup, panelsplitter, accordion, tabs..) JHeadstart 11g puts JSF/ADF ‘on rails’ with extreme productive no code generation of CRUD++ applications 21 www.devoxx.com

Concluding statement

Development of JavaServer Faces applications can and should be fast and productive yet rich and attractive with full focus on business functionality ADF 11g allows for rapid JSF application development. JHeadstarts adds the highway (railway) to a jumpstart, especially when creating CRUD++ applications.

Both can easily be enhanced by Java programmers

Give it a try (all software can be downloaded from OTN) www.devoxx.com

Q&A

www.devoxx.com

Thanks for your attention!

See: http://technology.amis.nl/blog for resources, more demonstrations, examples and presentation material www.devoxx.com

Email: [email protected]