SlideShare uma empresa Scribd logo
1 de 32
1
Development in Java EE 7 with JSF
Does it still matter?
2
Agenda
● Java and web development
● Weaknesses (of the past)
● A small story
● Choosing JSF, things to consider during
development
3
● Programming in Java since 2000
● In love with back-end code and JavaEE
● Web-development
– Using..servlets
– JSP(s)... and script-lets (they forced me to ... :P )
– Apache Struts 1.x
– JSF 1.x
– JSF 2.x
4
Java and Web Development
5
Java and Web Development..contd
6
Java and Web Development
● Let's face it, the Java ecosystem was struggling
for many years in order to come up with a 'one
to rule them all' web framework.
● From servlets to JSP(s) to action frameworks
(yaay) but always very close 'mentally' to the
HTTP paradigm.
● Frameworks getting bigger and bigger, more
complex, steep learning curve.
7
Java and Web Development...and
me
● Well, I totally agree, writing web based
applications in the past was not very exciting
● And then JSF came, it broke the existing 'action
frameworks' paradigm....
● And then....
8
My first encounter with JSF..a long
time ago
9
JSF original Hate
● Complex framework
● Slow, the JSF life cycle is an overkill!
● Non optimal front end support technologies, jsp, facelets
etc
● Steep learning curve
● Far away from the action based frameworks (yaay)
● Poor Ajax support
● Buggy component libraries
● Too many implementations, slow evolving spec
10
James Gosling..father of Java
'I hate JSF with a passion...'
11
A small story
● A small team of Java developers (3),different
experience levels, today- 2014!
● Task, re-write a legacy web application (banking, back
office)
● Legacy app... code written in JPS(s), full stop.
● No specifications
● We need it fast, ASAP
● We need something better, dynamic, easy to maintain,
more beautiful, user friendly.
12
A small story - 2
● So which framework and architecture shall we
choose?
● Shall we skip JSF,while embracing all the other
parts of the JavaEE architecture?
● Choose something else?
– GWT? (Vaadin?)
– Pure JS framework?
● Which one?
13
A small story - 3
● If we choose JSF what are our restrictions?
● Which application server are we going to use?
● What is the existing JSF support on the above app servers?
● What component library shall we use?
● What about JavaScript and Ajax support?
● How much time will it take our small team to learn and code
on a different framework / technology?
● What technologies we currently master or we are familiar with
now?
14
Choices, choices, choices
15
The JSF way – why? - team
● We were a 'pure' Java team, with existing experience on
Java EE.
● We needed something ASAP, so we needed to
leverage our existing skill set.
● Minimize coding on Javascript, but being able to
leverage Ajax and async functionality in our web app.
● I consider JS a maintenance nightmare / a ticking bomb
to many codebases.
– Warning possible flame trigger in the audience – let's start everybody!!!
16
State of the specification?
● Currently JSF 2.2 – JSR 334 Final
● Part of the Java EE 7 spec
● JSF 2.0, 2.1, 2.2 simplified many ugly things of the past.
● Concrete implementations
– Mojarra
– Apache MyFaces
● The spec is evolving, we hope much faster
– https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC
17
Application server support?
● This is something you need to watch out!
● All the mainstream app servers come bundled with an concrete
implementation.
● Oracle Weblogic 12c
– Mojarra (JSF 2.1)
● Oracle GlassFish 4 (R.I.P?)
– Mojarra (JSF 2.2 )
● IBM WebSphere 8.5.5
– Apache MyFaces (JSF 2.1)
● RedHat WildFly (JBoss)
– Mojarra (JSF 2.2)
18
Component libraries?
● Lot's of choices!
● PrimeFaces (yaay!!!)
● OmniFaces
● RichFaces
● Oracle ADF
● Apache Trinitad / Tomahawk/ Tobago
● Show cases:
– http://robertjliguori.blogspot.gr/2014/04/jsf-component-library-showcases.html
19
What we choose?
● We could not change the app server so, the
target application was developed towards
WebSphere 8.5.5 and Apache My Faces 2.1.
● But we could choose the component library,
clear winner, PrimeFaces 4 – amazing features!
● XHTML pages only!
20
Bootstrapping development?
● Standard JavaEE6 multi-module web application
● Maven packaging, no special configuration
● A few entries on the web.xml, initializing the JSF library.
● Package the component library, just primefaces.jar
● Define a template for xhtml pages.
● No initial problems combining standard JSF xthml tags and
specific to the component
● Easy and problem free ..start, a first positive surprise!
21
Learn as you code
● Different levels of JSF coding experience.
● 3 man days of reading through JSF 2.1 specifics.
● Lot's of free resources and available books
– JSF the complete reference, Ed.Burns
● God bless to JSF heroes and dev community
– BalusC (http://balusc.blogspot.com/)
– StackOverflow, JSF section
22
Some basic guidelines
● Keep the code simple
● Make sure everyone understands the basic
scopes of Managed Beans
● Avoid Session Scoped Beans.
● Code using lean and clean entities (dto's)
● Code all the 'table' section of pages with lazy
loading.
23
Some basic guidelines - 2
● Identify 4-5 core use cases and apply the same
principles.
● Try to leverage the rich UI built in support of the
components rather than doing it your self. No extra
JS plz..no extra JS plz..no extra JS plz.
● Make use of Client Side Validation (Primefaces)
along with server side validation (JSF).
● Localization comes cheap :)
24
During development
● We managed to resolve corner cases as we developed
concrete examples, fast enough.
● We were amazed that most of UI requirements were
already covered and implemented by the component
library
– Lazy data models
– Async form posts
– Ajax support
– Partial form submits
– Another positive surprise!!!
25
During development
● JSF code integrated naturally with any pre-
existing code we had already developed e.g
JPA2 beans, and EJB(s).
● A simple and clear separation of layers that is
easy to be taught and followed, by junior
members.
● JSF built in error management and handling,
helps you identify easily bugs and resolve
problems.
26
During development
● We used CDI, but we felt that there is still room for
improvement when you mix different annotations together.
● We would be happier if our app server was more flexible
on allowing us to experiment with another JSF
engine.Some app servers are more flexible.
● Total lines of extra Javascript written (less than 10 and not
in a jsf component)
● Our app can easily migrate from Websphere to another
container.
27
Why you should consider JSF
● If you are already a team with core Java skill
set and you want to use this skillset asap
● JSF 2.x is and it's concrete implementations
are far easier to use and grasp comparing to
JSF 1.x
● Lot's of documentation and support.
● All major app servers support it and come pre-
bundled with an existing implementation.
28
Why you should consider JSF
● IMHO it is easier in the future to maintain an aging Java code
base rather than a JScript one.
● Freedom of choice, you can de-couple the choice of which
JSF implementation to use and what component library.
● Many component libraries offer amazing out of the box
functionality for free! No need to re-invent the wheel.
– Many libraries offer out of the box rendering to mobile clients with no
extra coding.
29
Why you should consider JSF
● JSF 2.2 introduces HTML 5 support (html 5 friendly mark up)
● Extended support for complex implementation cases e.g Faces
Flow
● Added more Explicit CSRF support
● Do not forger that from JSF 2 and onwards 'partial state saving'
when submitting forms and stateless mode are supported.
– Meaning, yes you can scale to thousands of users,and your session
does not have to be hundreds of MB(s)
30
Is it late?
● JSF is around more than 10 years
● Some people argue that it's maturity came very
late.
● I believe that as long as web development in
the form we currently know it (for the browser)
is relevant, JSF will be a valid choice especially
for teams with Java Developers.
31
Question
Will you reconsider?
– I did
32
<h:outputText value="Thanks for
your time..."/>

Mais conteúdo relacionado

Mais procurados

The JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in AhmedabadThe JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in AhmedabadTOPS Technologies
 
002- JavaFX Tutorial - Getting Started
002- JavaFX Tutorial - Getting Started002- JavaFX Tutorial - Getting Started
002- JavaFX Tutorial - Getting StartedMohammad Hossein Rimaz
 
Introduction To NetBeans IDE
Introduction To NetBeans IDEIntroduction To NetBeans IDE
Introduction To NetBeans IDEMuhammad Ghazali
 
Java Comments | Java course
Java Comments | Java courseJava Comments | Java course
Java Comments | Java courseRAKESH P
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornMiroslav Resetar
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xGeertjan Wielenga
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum SlidesAbhishek Gupta
 
Core java learning path for beginners
Core java learning path for beginnersCore java learning path for beginners
Core java learning path for beginnersJobbackingCodeHelpMe
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?NexSoftsys
 
Real World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCReal World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCCarlo Bonamico
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinRikard Thulin
 

Mais procurados (20)

The JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in AhmedabadThe JAVA Training Workshop in Ahmedabad
The JAVA Training Workshop in Ahmedabad
 
Java 1
Java 1Java 1
Java 1
 
Java History
Java HistoryJava History
Java History
 
002- JavaFX Tutorial - Getting Started
002- JavaFX Tutorial - Getting Started002- JavaFX Tutorial - Getting Started
002- JavaFX Tutorial - Getting Started
 
Java history 01
Java history 01Java history 01
Java history 01
 
Introduction To NetBeans IDE
Introduction To NetBeans IDEIntroduction To NetBeans IDE
Introduction To NetBeans IDE
 
Java Comments | Java course
Java Comments | Java courseJava Comments | Java course
Java Comments | Java course
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.x
 
Java fx
Java fx Java fx
Java fx
 
Java features
Java featuresJava features
Java features
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Core java learning path for beginners
Core java learning path for beginnersCore java learning path for beginners
Core java learning path for beginners
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
Introduction To JavaFX 2.0
Introduction To JavaFX 2.0Introduction To JavaFX 2.0
Introduction To JavaFX 2.0
 
JavaFX
JavaFXJavaFX
JavaFX
 
Real World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCReal World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVC
 
Java
JavaJava
Java
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
 
Javantura Zagreb 2014 - universAAL - Andrej Grgurić
Javantura Zagreb 2014 - universAAL - Andrej GrgurićJavantura Zagreb 2014 - universAAL - Andrej Grgurić
Javantura Zagreb 2014 - universAAL - Andrej Grgurić
 

Semelhante a Web development in JavaEE7 with JSF, does it still matter?

Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Codecamp Romania
 
java web framework standard.20180412
java web framework standard.20180412java web framework standard.20180412
java web framework standard.20180412FirmansyahIrma1
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesJesse Gallagher
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should AboutBJIT Ltd
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year projectsuneel singh
 
Agile Software Development by Sencha
Agile Software Development by SenchaAgile Software Development by Sencha
Agile Software Development by SenchaLael Rukius
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isilWilly Aguirre
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isilWilly Aguirre
 
Seattle bestpractices2010
Seattle bestpractices2010Seattle bestpractices2010
Seattle bestpractices2010Olaseni Odebiyi
 
Java Web Frameworks Sweetspots
Java Web Frameworks SweetspotsJava Web Frameworks Sweetspots
Java Web Frameworks SweetspotsMatt Raible
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...Radovan Semancik
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software EngineerSean Coates
 
RichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentRichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentLukáš Fryč
 
Connect 2014 - AD202 - Get the best out of bootstrap with bootstrap4 x-pages
Connect 2014 - AD202 -  Get the best out of bootstrap with bootstrap4 x-pagesConnect 2014 - AD202 -  Get the best out of bootstrap with bootstrap4 x-pages
Connect 2014 - AD202 - Get the best out of bootstrap with bootstrap4 x-pagesPhilippe Riand
 

Semelhante a Web development in JavaEE7 with JSF, does it still matter? (20)

Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
java web framework standard.20180412
java web framework standard.20180412java web framework standard.20180412
java web framework standard.20180412
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About
 
Spring
SpringSpring
Spring
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
Agile Software Development by Sencha
Agile Software Development by SenchaAgile Software Development by Sencha
Agile Software Development by Sencha
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
 
Seattle bestpractices2010
Seattle bestpractices2010Seattle bestpractices2010
Seattle bestpractices2010
 
Social Network
Social NetworkSocial Network
Social Network
 
Java Web Frameworks Sweetspots
Java Web Frameworks SweetspotsJava Web Frameworks Sweetspots
Java Web Frameworks Sweetspots
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
 
Minor
MinorMinor
Minor
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 
RichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentRichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component Development
 
Connect 2014 - AD202 - Get the best out of bootstrap with bootstrap4 x-pages
Connect 2014 - AD202 -  Get the best out of bootstrap with bootstrap4 x-pagesConnect 2014 - AD202 -  Get the best out of bootstrap with bootstrap4 x-pages
Connect 2014 - AD202 - Get the best out of bootstrap with bootstrap4 x-pages
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 

Último

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
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
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Web development in JavaEE7 with JSF, does it still matter?

  • 1. 1 Development in Java EE 7 with JSF Does it still matter?
  • 2. 2 Agenda ● Java and web development ● Weaknesses (of the past) ● A small story ● Choosing JSF, things to consider during development
  • 3. 3 ● Programming in Java since 2000 ● In love with back-end code and JavaEE ● Web-development – Using..servlets – JSP(s)... and script-lets (they forced me to ... :P ) – Apache Struts 1.x – JSF 1.x – JSF 2.x
  • 4. 4 Java and Web Development
  • 5. 5 Java and Web Development..contd
  • 6. 6 Java and Web Development ● Let's face it, the Java ecosystem was struggling for many years in order to come up with a 'one to rule them all' web framework. ● From servlets to JSP(s) to action frameworks (yaay) but always very close 'mentally' to the HTTP paradigm. ● Frameworks getting bigger and bigger, more complex, steep learning curve.
  • 7. 7 Java and Web Development...and me ● Well, I totally agree, writing web based applications in the past was not very exciting ● And then JSF came, it broke the existing 'action frameworks' paradigm.... ● And then....
  • 8. 8 My first encounter with JSF..a long time ago
  • 9. 9 JSF original Hate ● Complex framework ● Slow, the JSF life cycle is an overkill! ● Non optimal front end support technologies, jsp, facelets etc ● Steep learning curve ● Far away from the action based frameworks (yaay) ● Poor Ajax support ● Buggy component libraries ● Too many implementations, slow evolving spec
  • 10. 10 James Gosling..father of Java 'I hate JSF with a passion...'
  • 11. 11 A small story ● A small team of Java developers (3),different experience levels, today- 2014! ● Task, re-write a legacy web application (banking, back office) ● Legacy app... code written in JPS(s), full stop. ● No specifications ● We need it fast, ASAP ● We need something better, dynamic, easy to maintain, more beautiful, user friendly.
  • 12. 12 A small story - 2 ● So which framework and architecture shall we choose? ● Shall we skip JSF,while embracing all the other parts of the JavaEE architecture? ● Choose something else? – GWT? (Vaadin?) – Pure JS framework? ● Which one?
  • 13. 13 A small story - 3 ● If we choose JSF what are our restrictions? ● Which application server are we going to use? ● What is the existing JSF support on the above app servers? ● What component library shall we use? ● What about JavaScript and Ajax support? ● How much time will it take our small team to learn and code on a different framework / technology? ● What technologies we currently master or we are familiar with now?
  • 15. 15 The JSF way – why? - team ● We were a 'pure' Java team, with existing experience on Java EE. ● We needed something ASAP, so we needed to leverage our existing skill set. ● Minimize coding on Javascript, but being able to leverage Ajax and async functionality in our web app. ● I consider JS a maintenance nightmare / a ticking bomb to many codebases. – Warning possible flame trigger in the audience – let's start everybody!!!
  • 16. 16 State of the specification? ● Currently JSF 2.2 – JSR 334 Final ● Part of the Java EE 7 spec ● JSF 2.0, 2.1, 2.2 simplified many ugly things of the past. ● Concrete implementations – Mojarra – Apache MyFaces ● The spec is evolving, we hope much faster – https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC
  • 17. 17 Application server support? ● This is something you need to watch out! ● All the mainstream app servers come bundled with an concrete implementation. ● Oracle Weblogic 12c – Mojarra (JSF 2.1) ● Oracle GlassFish 4 (R.I.P?) – Mojarra (JSF 2.2 ) ● IBM WebSphere 8.5.5 – Apache MyFaces (JSF 2.1) ● RedHat WildFly (JBoss) – Mojarra (JSF 2.2)
  • 18. 18 Component libraries? ● Lot's of choices! ● PrimeFaces (yaay!!!) ● OmniFaces ● RichFaces ● Oracle ADF ● Apache Trinitad / Tomahawk/ Tobago ● Show cases: – http://robertjliguori.blogspot.gr/2014/04/jsf-component-library-showcases.html
  • 19. 19 What we choose? ● We could not change the app server so, the target application was developed towards WebSphere 8.5.5 and Apache My Faces 2.1. ● But we could choose the component library, clear winner, PrimeFaces 4 – amazing features! ● XHTML pages only!
  • 20. 20 Bootstrapping development? ● Standard JavaEE6 multi-module web application ● Maven packaging, no special configuration ● A few entries on the web.xml, initializing the JSF library. ● Package the component library, just primefaces.jar ● Define a template for xhtml pages. ● No initial problems combining standard JSF xthml tags and specific to the component ● Easy and problem free ..start, a first positive surprise!
  • 21. 21 Learn as you code ● Different levels of JSF coding experience. ● 3 man days of reading through JSF 2.1 specifics. ● Lot's of free resources and available books – JSF the complete reference, Ed.Burns ● God bless to JSF heroes and dev community – BalusC (http://balusc.blogspot.com/) – StackOverflow, JSF section
  • 22. 22 Some basic guidelines ● Keep the code simple ● Make sure everyone understands the basic scopes of Managed Beans ● Avoid Session Scoped Beans. ● Code using lean and clean entities (dto's) ● Code all the 'table' section of pages with lazy loading.
  • 23. 23 Some basic guidelines - 2 ● Identify 4-5 core use cases and apply the same principles. ● Try to leverage the rich UI built in support of the components rather than doing it your self. No extra JS plz..no extra JS plz..no extra JS plz. ● Make use of Client Side Validation (Primefaces) along with server side validation (JSF). ● Localization comes cheap :)
  • 24. 24 During development ● We managed to resolve corner cases as we developed concrete examples, fast enough. ● We were amazed that most of UI requirements were already covered and implemented by the component library – Lazy data models – Async form posts – Ajax support – Partial form submits – Another positive surprise!!!
  • 25. 25 During development ● JSF code integrated naturally with any pre- existing code we had already developed e.g JPA2 beans, and EJB(s). ● A simple and clear separation of layers that is easy to be taught and followed, by junior members. ● JSF built in error management and handling, helps you identify easily bugs and resolve problems.
  • 26. 26 During development ● We used CDI, but we felt that there is still room for improvement when you mix different annotations together. ● We would be happier if our app server was more flexible on allowing us to experiment with another JSF engine.Some app servers are more flexible. ● Total lines of extra Javascript written (less than 10 and not in a jsf component) ● Our app can easily migrate from Websphere to another container.
  • 27. 27 Why you should consider JSF ● If you are already a team with core Java skill set and you want to use this skillset asap ● JSF 2.x is and it's concrete implementations are far easier to use and grasp comparing to JSF 1.x ● Lot's of documentation and support. ● All major app servers support it and come pre- bundled with an existing implementation.
  • 28. 28 Why you should consider JSF ● IMHO it is easier in the future to maintain an aging Java code base rather than a JScript one. ● Freedom of choice, you can de-couple the choice of which JSF implementation to use and what component library. ● Many component libraries offer amazing out of the box functionality for free! No need to re-invent the wheel. – Many libraries offer out of the box rendering to mobile clients with no extra coding.
  • 29. 29 Why you should consider JSF ● JSF 2.2 introduces HTML 5 support (html 5 friendly mark up) ● Extended support for complex implementation cases e.g Faces Flow ● Added more Explicit CSRF support ● Do not forger that from JSF 2 and onwards 'partial state saving' when submitting forms and stateless mode are supported. – Meaning, yes you can scale to thousands of users,and your session does not have to be hundreds of MB(s)
  • 30. 30 Is it late? ● JSF is around more than 10 years ● Some people argue that it's maturity came very late. ● I believe that as long as web development in the form we currently know it (for the browser) is relevant, JSF will be a valid choice especially for teams with Java Developers.