SlideShare a Scribd company logo
1 of 49
Download to read offline
Future of JSF / Oracle ADF
“Good bye J2EE?” No!, It is time for Jakarta EE!
Daniel Merchán García
Agenda
• Introduction
• J2EE? Time for Jakarta EE!
• Server Side vs Front Side
• Java Server Faces (JSF): Roadmap and JSF 2.3+
• Oracle Application Development Framework (ADF):
Roadmap
• Comparison: Oracle ADF 12cR2 (JSF 2.2) vs JSF 2.3
• Conclusion
• Contact Details
• Questions / Share your thoughts ☺
Introduction
What’s my future as an J2EE Architect / Developer?
J2EE is now Jakarta EE
Oracle has given
Java EE to Eclipse
Foundation.
It is not EE4J (Eclipse
Enterprise for Java)
the name selected is
Jakarta EE.
The latest release of
J2EE under Oracle
was Java EE 8.
The migration to
Jakarta EE is still in
process.
javax.enterprise
packages will not be
re-factored to
eclipse.org
Progress of
the Journey
Java EE to
Jakarta EE
https://github.com/eclipse-ee4j
What we have right now in Java EE 8?
Java EE Security API – JSR
375
• Identity Store and
Authentication to
abstract vendor specific
security.
JSON-B / JSON-P / JAX-RS
(Enhancements)
• Enhance Java JSON API
support with Marshal /
Un-marshal JSON to
Java Objects as same as
JAX-WS does.
JPA 2.2
• Provides stream()
result support (similar
to Hibernate)
• @Repeatable
annotation to allow
using the same
annotation multiple
times in the same class.
• Alignment with Java
Date / Time
What we have right now in Java EE 8?
JSF 2.3
• Web Socket Support
• CDI Alignment
• JSF Manage Bean
Deprecation
• Validation / Conversion
Improvements
• UI Component / API
enhancements
• Alignment with Java 8 Date
/ Time new API
Servlet 4.0
• HTTP 2.0 Support
• Request / Response
multiplexing
• Stream prioritizing
• Server push.
CDI 2 and Bean Validation 2
• Big improvements in
@Observers and the
inclusion of Asynchronous
events.
• Alignment with Java 8 such
as streams, lambdas and the
new Date / Time API…
What’s coming
now with
Jakarta EE
Moving to Cloud-Native,
Microservices friendly Java
Enterprise.
• MicroProfile merge in Jakarta EE?
Deprecate old and un-used
technologies in Java EE to move
forward quickly.
Make the first Jakarta EE compatible
release with Java EE 8
Now the community decides.
Welcome back to Open Source! We do
not depend to any vendor anymore ☺
Introduction
Server Side vs Front End Side
JavaScript
Frameworks
everywhere!
A typical conversation with a
Front-End evangelist
(me) “Hello friend!, I am using JSF 2.3 with PrimeFaces
for building my Enterprise Application! It looks great!”
(friend) No, wait!! That’s old, slow and not modern!
“Use Angular JS it is the best!” move on from Java!
(friend)(2 minutes later): “Angular JS now using
types??? It remembers me to Java. Don’t use it”
(friend)(2,1 minutes later) “Use React is the best!
Angular is shit”
(me) Ok… let me try Front-End. What automating
framework should I use? Grunt?
(friend) Why are you using Grunt? Use Gulp is the
best!!!...
(friend) (3 minutes later webpack is released): No
wait!… use webpack! Gulp is old!.
Server Side or Front-End Framework
Do not be seduced by trending’s.
“Old” technology frameworks are more mature and
stable.
Open your mind and become a Full-Stack developer.
Combine the force of Java and JavaScript!
History / Roadmap
Java Server Faces
JavaServer Faces History
JSF 1.0 / 1.1
•2004
JSF 1.2
•2006
JSF 2.0
•2009
JSF 2.1
•2010
JSF 2.2
•2013
JSF 2.3
•2017
JSF 2.4 / Next
•2018 - 2019
What we have in JSF 2.3+?
• Following slides contains some of
the most important updates on
JSF 2.3 published in 2017.
• Some of them can be “work-
around in Oracle ADF” with some
coding.
• Some of them are really great
• Not all of news and updates are
covered!, but it will give a great
idea!.
JSF 2.3: CDI Bean Alignment
• @Inject your JSF Objects and avoid the
infinite code length typically produced in JSF.
Ready for CDI!.
• New EL Expressions to simplify the access to
JSF objects.
• New @ManagedProperty annotation CDI
Compatible for @Inject an EL Expression
• Deprecation of JSF Managed Beans.
Do not use javax.faces.beans anymore!
• For JSF specific scopes: FlowScope and
ViewScope use the CDI equivalents in
javax.faces.view
JSF 2.3: Lifecycle
• In JSF 2.0 <f:event> and JSF 2.2
<f:viewAction> (which allows to execute
only in Postback) were introduced.
Both have similar functionalities for
executing server code in a specific moment
of the new JSF Events introduced as part of
JSF 2.0
• In JSF 2.3 a new event has been added to
the lifecycle: PostRenderViewEvent to be
the opposite / friend of
PreRenderViewEvent
• We can use this event for executing code
after rendering the component without
penalizing the initial loading.
JSF 2.3: Networking
Web Socket
• Native support for WebSocket
• New tag <f:websocket> which creates a
communication channel
• Use PushContext object @Inject
@Push(name=“channelName”) for
pushing information to UI
JSF 2.3: AJAX
(h:commandScript)
• Encapsulate AJAX requests in JavaScript
functions placed in the Global Scope.
• Extends UICommand so it admits action,
actionListener, immediate, render,
execute…
JSF 2.3: API Enhancement
• UIData and UIRepeat allows now to also
now to iterate over java.util.Map.
• Custom types for UIRepeat / UIData can
be created by registering our own
@FacesDataModel
• Note: Built-in types cannot be
overridden!!!
JSF 2.3: Validation
• Bean Validation has its limitation in JSF 2.2.
Limited to validating individual properties
bound to individual components
• Bean validation also has a concept of class
level validation. This special validator can
then do cross-field validations. For
instance, check that values (different fields)
are equal.
• Class level validation does not play well
with the JSF validation model though. In
JSF the model is not updated if a validation
fails. But, a class level validation requires a
updated model!
• In JSF 2.3+ has been introduced
<f:validateWholeBean> to enable class
level validation and address this scenario.
JSF 2.3: f:validateWholeBean Example
Define Validator
JSF 2.3: f:validateWholeBean Example
Use in Backing Bean
JSF 2.3: f:validateWholeBean Example
Facelets View
JSF 2.3: Conversion
• JDK 8 Date Time API Support!. Now you can
use f:converDateTime with the new Java
API – JSR 310
• JSF 2.2/2.3: When the converter type
attribute value is {date, time, both} uses
the java.text.SimpleDateFormat class.
• Starting with JSF 2.3, when the converter
type attribute value is {localDate,
localTime, localDateTime, offsetTime,
offsetDateTime , zonedDateTime}, the
java.time.format.DateTimeFormatter class
will be used.
JSF 2.3: Components
Component Search FMW
• Identifying a particular component
in its component tree by using an
absolute hierarchical ID, or a
relative local ID. Constructing the
absolute ID is not always easy,
especially not if a page makes
extensive use of templates and
includes.
• In JSF 2.3+ has been introduced a
Component Search Framework
JSF 2.3: Components
Component Search FMW
• This table displays the keywords
that can be used to easily search
for a component in the JSF Tree.
Keyword Description
@child(n) The nth child of the base component
@composite
The closest composite component ancestor of the base
component
@id(id)
All component descendants of the base component
with the specified component id
@namingcontainer
The closest NamingContainer ancestor of the base
component
@next
The next component in the view after the base
component
@parent The parent of the base component
@previous The previous component to the base component
@root The UIViewRoot
JSF 2.3: Components
Component Search FMW Example
Expression
Base
component
Resolves to:
@child(0) :f1
<h:button id=“b1" outcome=“lol">Button
foo</h:button>
@child(1) :f1
<h:commandButton id=“cb1"
action="#{configurationBean.foo()}"
value="invoke foo"/>
@id(body) :f1 <h:outputText id="body" value="body"/>
@namingcontainer :f1:cb1 <h:form id=“f1">
@next :f1:cb1 <h:outputText id="body" value="body"/>
@parent :f1 <h:panelGroup id=“pg">
@previous :f1:cb1
<h:button id=“b1" outcome=“lol">Button
foo</h:button>
@root :f1 [UIViewRoot]
JSF 2.3: Components
Component Search FMW Example
JSF 2.3: Components
(Summary)
• rowClass in dataTable. Yes…
Finally!
• Single Radio button component!
<h:selectOneRadio>
• Automatic Conversion in
UISelectMany.
• And more…
https://arjan-
tijms.omnifaces.org/p/jsf-
23.html#1238
https://dzone.com/articles/javaserv
er-faces-23-1
History / Roadmap
Oracle Application Development Framework
Oracle ADF History
ADF 10g
• 2004
ADF 11gR1
• 2007
• JSF 1.2
ADF11gR2
• 2011
• JSF 2.0
ADF 12cR1
• 2013
• JSF 2.0
ADF 12cR2
• 2015
• JSF 2.2
???
• ???
Oracle ADF - Now and Future
Oracle ADF is based on JavaServer Faces. You love it or hate it. There is not middle
point. ☺
Oracle ADF 12.2.1.3 (latest release) is based on JSF 2.2.
There are not plans for upgrading Oracle ADF to be aligned with JSF 2.3+ and beyond.
Oracle ADF is still supported by Oracle, but it will not receive major improvements or
upgrades.
Should I still use
Oracle ADF?
Yes…, but….
• Oracle ADF Business Components are
a great option for building business
services and expose as REST.
• Oracle JET does not replace Oracle
ADF <- They are different!
• Stable and mature.
• Excellent for Java background
developers for building internal
Enterprise Applications.
Yes:
• No plans for improving / enhancing
the framework. Only bug fixing.
• ADF Faces is not evolving as other JSF
implementations such as PrimeFaces.
• Oracle ADF developers are becoming
the new “COBOL” developers. The
community is decreasing compared
to Oracle JET or other Front-End
framework technologies.
But:
Oracle ADF 12cR2 (JSF 2.2) vs JSF 2.3+
Equivalent or how to use “JSF2.3” in ADF 12cR2 (JSF2.2)
Can I use CDI Manage
Beans in Oracle ADF?
• Oracle WebLogic 12cR2+ is compatible
with CDI Managed Beans.
• You can enable CDI in your Oracle ADF
Projects if you are using Java EE6+
• When trying to use CDI annotations,
JDeveloper will suggest to configure CDI
support and creates beans.xml for you
CDI Managed Bean in Oracle ADF
Should I only use CDI in
Oracle ADF as JSF
Managed Beans are
deprecated in 2.3?
• My suggestion is: NO! Oracle does
not has plan to move into JSF 2.3
• Injecting CDI in JSF and vice-versa
requires some extra coding. It does not
work using annotations.
• JDeveloper IDE suggestions / code
assistant sometimes does not work
properly with CDI Managed Beans.
• JSF 2.2 is not fully ready for inject CDI in
Validator / Converter and other JSF
Artefacts.
• JSF 2.3 CDI compatible scope called
FlowScope is not equivalent to
PageFlowScope in Oracle ADF.
Web Socket
Endpoint
Server Listener
ADF Application
Web Socket
Client
Using Web Sockets in
Oracle ADF
• Oracle ADF does not provide
<f:websocket>. But Web
Sockets can be used anyway in
a non-declarative way.
• Create your Web Socket
Endpoint (Server Side)
• Connect from your ADF
Application to listen messages
pushed from the Server.
Using Web Sockets in ADF
Client
Server
h:commandScript… I
know you…
JSF 2.3
ADF 12c
Validatation
Update Model
Invoke
Application
(actionListener)
Validate Fields
Simulate - Perform Class-
Level Validation
f:validateWholeBean
in ADF 12c?
• No!, but we can continue with the
alternative
• Validation in Field level.
• Validation in ActionListener
for simulate the Class-
Validator multifield behavior
Java 8 Date / Time in
ADF 12c
• af:convertDateTime does not
support the new JSR-310 Date Time
API
• Create your own Converter is the
alternative.
Component Search
Framework in ADF?
• Use the traditional ADFUtils
findComponent auxiliar method as
you did always.
Conclusion
My personal view on our future
Summary
Coding in Oracle ADF maybe
feels “retro”
Oracle ADF is still a very
valid option for developing
Enterprise Applications.
JSF 2.3 introduced many
improvements, but the most
of them they have a code
driven alternative in Oracle
ADF as shown in this
presentation.
Oracle should align ADF with
new J2SE API Standards such
as the new Date / Time API.
THINK TWICE before
choosing Oracle ADF over
Oracle JET for your project.
Questions?
Share your
thoughts ☺
Contact
Daniel Merchán García
Architect / Developer / Dreamer
Magic Pigeon Ltd
Website: https://magicpigeon.com
Blog: http://danielmerchanoracle.blogspot.co.uk
Email: daniel.merchan@magicpigeon.com
Twitter: https://twitter.com/dmerchang
LinkedIn: https://www.linkedin.com/in/danielmerchangarcia/
Co-Author of
Beginning Oracle WebCenter Portal 12c Book
3 Membership Tiers
• Oracle ACE Director
• Oracle ACE
• Oracle ACE Associate
bit.ly/OracleACEProgram
500+ Technical Experts
Helping Peers Globally
Connect:
Nominate yourself or someone you know: acenomination.oracle.com
@oracleace
Facebook.com/oracleaces
oracle-ace_ww@oracle.com

More Related Content

What's hot

Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJBFun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJBArun Gupta
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Bruno Borges
 
Haj 4308-open jpa, eclipselink, and the migration toolkit
Haj 4308-open jpa, eclipselink, and the migration toolkitHaj 4308-open jpa, eclipselink, and the migration toolkit
Haj 4308-open jpa, eclipselink, and the migration toolkitKevin Sutter
 
Academy PRO: React JS
Academy PRO: React JSAcademy PRO: React JS
Academy PRO: React JSBinary Studio
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Levelbalassaitis
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Spring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepSpring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepRajiv Gupta
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7Arun Gupta
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크Yoonki Chang
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpodilodif
 
The Eclipse Transformer Project
The Eclipse Transformer Project The Eclipse Transformer Project
The Eclipse Transformer Project Jakarta_EE
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 
Lecture 1: Introduction to JEE
Lecture 1:  Introduction to JEELecture 1:  Introduction to JEE
Lecture 1: Introduction to JEEFahad Golra
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondOracle
 

What's hot (20)

Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJBFun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
 
Angularj2.0
Angularj2.0Angularj2.0
Angularj2.0
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
Hibernate
HibernateHibernate
Hibernate
 
Next stop: Spring 4
Next stop: Spring 4Next stop: Spring 4
Next stop: Spring 4
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
 
Haj 4308-open jpa, eclipselink, and the migration toolkit
Haj 4308-open jpa, eclipselink, and the migration toolkitHaj 4308-open jpa, eclipselink, and the migration toolkit
Haj 4308-open jpa, eclipselink, and the migration toolkit
 
Academy PRO: React JS
Academy PRO: React JSAcademy PRO: React JS
Academy PRO: React JS
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
WebLogic for DBAs
WebLogic for DBAsWebLogic for DBAs
WebLogic for DBAs
 
Spring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepSpring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by step
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtp
 
The Eclipse Transformer Project
The Eclipse Transformer Project The Eclipse Transformer Project
The Eclipse Transformer Project
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
Maven
MavenMaven
Maven
 
Lecture 1: Introduction to JEE
Lecture 1:  Introduction to JEELecture 1:  Introduction to JEE
Lecture 1: Introduction to JEE
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
 

Similar to NLOUG 2018 - Future of JSF and ADF

Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2Rajiv Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Arun Gupta
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureArun Gupta
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Arun Gupta
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureIndicThreads
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 

Similar to NLOUG 2018 - Future of JSF and ADF (20)

Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
oraclewls-jrebel
oraclewls-jrebeloraclewls-jrebel
oraclewls-jrebel
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the future
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
Jsf 2.0 Overview
Jsf 2.0 OverviewJsf 2.0 Overview
Jsf 2.0 Overview
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
First8 java one review 2016
First8 java one review 2016First8 java one review 2016
First8 java one review 2016
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

NLOUG 2018 - Future of JSF and ADF

  • 1. Future of JSF / Oracle ADF “Good bye J2EE?” No!, It is time for Jakarta EE! Daniel Merchán García
  • 2. Agenda • Introduction • J2EE? Time for Jakarta EE! • Server Side vs Front Side • Java Server Faces (JSF): Roadmap and JSF 2.3+ • Oracle Application Development Framework (ADF): Roadmap • Comparison: Oracle ADF 12cR2 (JSF 2.2) vs JSF 2.3 • Conclusion • Contact Details • Questions / Share your thoughts ☺
  • 3. Introduction What’s my future as an J2EE Architect / Developer?
  • 4. J2EE is now Jakarta EE Oracle has given Java EE to Eclipse Foundation. It is not EE4J (Eclipse Enterprise for Java) the name selected is Jakarta EE. The latest release of J2EE under Oracle was Java EE 8. The migration to Jakarta EE is still in process. javax.enterprise packages will not be re-factored to eclipse.org
  • 5. Progress of the Journey Java EE to Jakarta EE https://github.com/eclipse-ee4j
  • 6. What we have right now in Java EE 8? Java EE Security API – JSR 375 • Identity Store and Authentication to abstract vendor specific security. JSON-B / JSON-P / JAX-RS (Enhancements) • Enhance Java JSON API support with Marshal / Un-marshal JSON to Java Objects as same as JAX-WS does. JPA 2.2 • Provides stream() result support (similar to Hibernate) • @Repeatable annotation to allow using the same annotation multiple times in the same class. • Alignment with Java Date / Time
  • 7. What we have right now in Java EE 8? JSF 2.3 • Web Socket Support • CDI Alignment • JSF Manage Bean Deprecation • Validation / Conversion Improvements • UI Component / API enhancements • Alignment with Java 8 Date / Time new API Servlet 4.0 • HTTP 2.0 Support • Request / Response multiplexing • Stream prioritizing • Server push. CDI 2 and Bean Validation 2 • Big improvements in @Observers and the inclusion of Asynchronous events. • Alignment with Java 8 such as streams, lambdas and the new Date / Time API…
  • 8. What’s coming now with Jakarta EE Moving to Cloud-Native, Microservices friendly Java Enterprise. • MicroProfile merge in Jakarta EE? Deprecate old and un-used technologies in Java EE to move forward quickly. Make the first Jakarta EE compatible release with Java EE 8 Now the community decides. Welcome back to Open Source! We do not depend to any vendor anymore ☺
  • 11. A typical conversation with a Front-End evangelist (me) “Hello friend!, I am using JSF 2.3 with PrimeFaces for building my Enterprise Application! It looks great!” (friend) No, wait!! That’s old, slow and not modern! “Use Angular JS it is the best!” move on from Java! (friend)(2 minutes later): “Angular JS now using types??? It remembers me to Java. Don’t use it” (friend)(2,1 minutes later) “Use React is the best! Angular is shit” (me) Ok… let me try Front-End. What automating framework should I use? Grunt? (friend) Why are you using Grunt? Use Gulp is the best!!!... (friend) (3 minutes later webpack is released): No wait!… use webpack! Gulp is old!.
  • 12. Server Side or Front-End Framework Do not be seduced by trending’s. “Old” technology frameworks are more mature and stable. Open your mind and become a Full-Stack developer. Combine the force of Java and JavaScript!
  • 13. History / Roadmap Java Server Faces
  • 14. JavaServer Faces History JSF 1.0 / 1.1 •2004 JSF 1.2 •2006 JSF 2.0 •2009 JSF 2.1 •2010 JSF 2.2 •2013 JSF 2.3 •2017 JSF 2.4 / Next •2018 - 2019
  • 15. What we have in JSF 2.3+? • Following slides contains some of the most important updates on JSF 2.3 published in 2017. • Some of them can be “work- around in Oracle ADF” with some coding. • Some of them are really great • Not all of news and updates are covered!, but it will give a great idea!.
  • 16. JSF 2.3: CDI Bean Alignment • @Inject your JSF Objects and avoid the infinite code length typically produced in JSF. Ready for CDI!. • New EL Expressions to simplify the access to JSF objects. • New @ManagedProperty annotation CDI Compatible for @Inject an EL Expression • Deprecation of JSF Managed Beans. Do not use javax.faces.beans anymore! • For JSF specific scopes: FlowScope and ViewScope use the CDI equivalents in javax.faces.view
  • 17. JSF 2.3: Lifecycle • In JSF 2.0 <f:event> and JSF 2.2 <f:viewAction> (which allows to execute only in Postback) were introduced. Both have similar functionalities for executing server code in a specific moment of the new JSF Events introduced as part of JSF 2.0 • In JSF 2.3 a new event has been added to the lifecycle: PostRenderViewEvent to be the opposite / friend of PreRenderViewEvent • We can use this event for executing code after rendering the component without penalizing the initial loading.
  • 18. JSF 2.3: Networking Web Socket • Native support for WebSocket • New tag <f:websocket> which creates a communication channel • Use PushContext object @Inject @Push(name=“channelName”) for pushing information to UI
  • 19. JSF 2.3: AJAX (h:commandScript) • Encapsulate AJAX requests in JavaScript functions placed in the Global Scope. • Extends UICommand so it admits action, actionListener, immediate, render, execute…
  • 20. JSF 2.3: API Enhancement • UIData and UIRepeat allows now to also now to iterate over java.util.Map. • Custom types for UIRepeat / UIData can be created by registering our own @FacesDataModel • Note: Built-in types cannot be overridden!!!
  • 21. JSF 2.3: Validation • Bean Validation has its limitation in JSF 2.2. Limited to validating individual properties bound to individual components • Bean validation also has a concept of class level validation. This special validator can then do cross-field validations. For instance, check that values (different fields) are equal. • Class level validation does not play well with the JSF validation model though. In JSF the model is not updated if a validation fails. But, a class level validation requires a updated model! • In JSF 2.3+ has been introduced <f:validateWholeBean> to enable class level validation and address this scenario.
  • 22. JSF 2.3: f:validateWholeBean Example Define Validator
  • 23. JSF 2.3: f:validateWholeBean Example Use in Backing Bean
  • 24. JSF 2.3: f:validateWholeBean Example Facelets View
  • 25. JSF 2.3: Conversion • JDK 8 Date Time API Support!. Now you can use f:converDateTime with the new Java API – JSR 310 • JSF 2.2/2.3: When the converter type attribute value is {date, time, both} uses the java.text.SimpleDateFormat class. • Starting with JSF 2.3, when the converter type attribute value is {localDate, localTime, localDateTime, offsetTime, offsetDateTime , zonedDateTime}, the java.time.format.DateTimeFormatter class will be used.
  • 26. JSF 2.3: Components Component Search FMW • Identifying a particular component in its component tree by using an absolute hierarchical ID, or a relative local ID. Constructing the absolute ID is not always easy, especially not if a page makes extensive use of templates and includes. • In JSF 2.3+ has been introduced a Component Search Framework
  • 27. JSF 2.3: Components Component Search FMW • This table displays the keywords that can be used to easily search for a component in the JSF Tree. Keyword Description @child(n) The nth child of the base component @composite The closest composite component ancestor of the base component @id(id) All component descendants of the base component with the specified component id @namingcontainer The closest NamingContainer ancestor of the base component @next The next component in the view after the base component @parent The parent of the base component @previous The previous component to the base component @root The UIViewRoot
  • 28. JSF 2.3: Components Component Search FMW Example Expression Base component Resolves to: @child(0) :f1 <h:button id=“b1" outcome=“lol">Button foo</h:button> @child(1) :f1 <h:commandButton id=“cb1" action="#{configurationBean.foo()}" value="invoke foo"/> @id(body) :f1 <h:outputText id="body" value="body"/> @namingcontainer :f1:cb1 <h:form id=“f1"> @next :f1:cb1 <h:outputText id="body" value="body"/> @parent :f1 <h:panelGroup id=“pg"> @previous :f1:cb1 <h:button id=“b1" outcome=“lol">Button foo</h:button> @root :f1 [UIViewRoot]
  • 29. JSF 2.3: Components Component Search FMW Example
  • 30. JSF 2.3: Components (Summary) • rowClass in dataTable. Yes… Finally! • Single Radio button component! <h:selectOneRadio> • Automatic Conversion in UISelectMany. • And more… https://arjan- tijms.omnifaces.org/p/jsf- 23.html#1238 https://dzone.com/articles/javaserv er-faces-23-1
  • 31. History / Roadmap Oracle Application Development Framework
  • 32. Oracle ADF History ADF 10g • 2004 ADF 11gR1 • 2007 • JSF 1.2 ADF11gR2 • 2011 • JSF 2.0 ADF 12cR1 • 2013 • JSF 2.0 ADF 12cR2 • 2015 • JSF 2.2 ??? • ???
  • 33. Oracle ADF - Now and Future Oracle ADF is based on JavaServer Faces. You love it or hate it. There is not middle point. ☺ Oracle ADF 12.2.1.3 (latest release) is based on JSF 2.2. There are not plans for upgrading Oracle ADF to be aligned with JSF 2.3+ and beyond. Oracle ADF is still supported by Oracle, but it will not receive major improvements or upgrades.
  • 34. Should I still use Oracle ADF? Yes…, but…. • Oracle ADF Business Components are a great option for building business services and expose as REST. • Oracle JET does not replace Oracle ADF <- They are different! • Stable and mature. • Excellent for Java background developers for building internal Enterprise Applications. Yes: • No plans for improving / enhancing the framework. Only bug fixing. • ADF Faces is not evolving as other JSF implementations such as PrimeFaces. • Oracle ADF developers are becoming the new “COBOL” developers. The community is decreasing compared to Oracle JET or other Front-End framework technologies. But:
  • 35. Oracle ADF 12cR2 (JSF 2.2) vs JSF 2.3+ Equivalent or how to use “JSF2.3” in ADF 12cR2 (JSF2.2)
  • 36. Can I use CDI Manage Beans in Oracle ADF? • Oracle WebLogic 12cR2+ is compatible with CDI Managed Beans. • You can enable CDI in your Oracle ADF Projects if you are using Java EE6+ • When trying to use CDI annotations, JDeveloper will suggest to configure CDI support and creates beans.xml for you
  • 37. CDI Managed Bean in Oracle ADF
  • 38. Should I only use CDI in Oracle ADF as JSF Managed Beans are deprecated in 2.3? • My suggestion is: NO! Oracle does not has plan to move into JSF 2.3 • Injecting CDI in JSF and vice-versa requires some extra coding. It does not work using annotations. • JDeveloper IDE suggestions / code assistant sometimes does not work properly with CDI Managed Beans. • JSF 2.2 is not fully ready for inject CDI in Validator / Converter and other JSF Artefacts. • JSF 2.3 CDI compatible scope called FlowScope is not equivalent to PageFlowScope in Oracle ADF.
  • 39. Web Socket Endpoint Server Listener ADF Application Web Socket Client Using Web Sockets in Oracle ADF • Oracle ADF does not provide <f:websocket>. But Web Sockets can be used anyway in a non-declarative way. • Create your Web Socket Endpoint (Server Side) • Connect from your ADF Application to listen messages pushed from the Server.
  • 40. Using Web Sockets in ADF Client Server
  • 42. Validatation Update Model Invoke Application (actionListener) Validate Fields Simulate - Perform Class- Level Validation f:validateWholeBean in ADF 12c? • No!, but we can continue with the alternative • Validation in Field level. • Validation in ActionListener for simulate the Class- Validator multifield behavior
  • 43. Java 8 Date / Time in ADF 12c • af:convertDateTime does not support the new JSR-310 Date Time API • Create your own Converter is the alternative.
  • 44. Component Search Framework in ADF? • Use the traditional ADFUtils findComponent auxiliar method as you did always.
  • 46. Summary Coding in Oracle ADF maybe feels “retro” Oracle ADF is still a very valid option for developing Enterprise Applications. JSF 2.3 introduced many improvements, but the most of them they have a code driven alternative in Oracle ADF as shown in this presentation. Oracle should align ADF with new J2SE API Standards such as the new Date / Time API. THINK TWICE before choosing Oracle ADF over Oracle JET for your project.
  • 48. Contact Daniel Merchán García Architect / Developer / Dreamer Magic Pigeon Ltd Website: https://magicpigeon.com Blog: http://danielmerchanoracle.blogspot.co.uk Email: daniel.merchan@magicpigeon.com Twitter: https://twitter.com/dmerchang LinkedIn: https://www.linkedin.com/in/danielmerchangarcia/ Co-Author of Beginning Oracle WebCenter Portal 12c Book
  • 49. 3 Membership Tiers • Oracle ACE Director • Oracle ACE • Oracle ACE Associate bit.ly/OracleACEProgram 500+ Technical Experts Helping Peers Globally Connect: Nominate yourself or someone you know: acenomination.oracle.com @oracleace Facebook.com/oracleaces oracle-ace_ww@oracle.com