SlideShare una empresa de Scribd logo
1 de 16
[object Object],[object Object],[object Object],[object Object],[object Object],An analysis of bookmarking & navigation techniques, and a proposal for a new solution. Making JSF “Pretty” ? ?
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Goals and Desired behavior JSF Navigation
1. Client requests /faces/page.jsf 2. Server renders /faces/page.jsf Web Client JSF App Server Before: Client URL:  N/A Client viewing:  N/A After: Client URL:  /faces/page.jsf Client viewing:  /faces/page.jsf Step 1: Initial Request Standard JSF Navigation
[object Object],2. Server processes navigation and renders /faces/page2.jsf Before: Client URL:  /faces/page.jsf Client viewing:  /faces/page.jsf After: Client URL:  /faces/page.jsf Client viewing:  /faces/page2.jsf Web Client JSF App Server Notice: client’s address bar does not match content displayed on the page. Step 2: Form Postback With Validation or Simple Navigation (no redirect) Standard JSF Navigation
Web Client JSF App Server ,[object Object],2. Server processes navigation and sends redirect to /faces/page2.jsf Two requests means additional bandwidth, response time, and CPU-utilization. 4. Server renders /faces/page2.jsf 3. Client submits request for /faces/page2.jsf Step 2: Alternate… Form post-back With redirect navigation to preserve view Id Standard JSF Navigation Before: Client URL:  /faces/page.jsf Client viewing:  /faces/page.jsf After: Client URL:  /faces/page2.jsf Client viewing:  /faces/page2.jsf
1. Client requests /mapped/page 2. Server renders /faces/page.jsf Web Client JSF App Server Before: Client URL:  N/A Client viewing:  N/A After: Client URL:  /mapped/page Client viewing:  /faces/page.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Step 1: Initial Request (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation
<html> <body> <form action=“/faces/page.jsf”> … </form> </body> </html> /mapped/page Web Client Before: Client URL:  N/A Client viewing:  N/A After: Client URL:  /mapped/page Client viewing:  /faces/page.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Rendered Output (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation Since JSF does not render the mapped URL, and instead renders the JSF view ID. After form submit, the URL will no longer be bookmarkable, or “pretty.”
1. Client submits form to /faces/page.jsf 2. Server processes navigation and renders new view Web Client JSF App Server Before: Client URL:  /mapped/page Client viewing:  /faces/page.jsf After: Client URL:  /faces/page.jsf Client viewing:  /faces/page.jsf  or  /faces/page2.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Form post-back with validation or navigation (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation: ( Without) Redirect URL Rewriting Pattern Notice: On validation, the client’s URL will no longer be the mapped URL, and on navigation the URL will not reflect the current view.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],(E.g.: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Pros / Cons Mapped JSF Navigation: ( Without) Redirect URL Rewriting Pattern
Web Client JSF App Server Before: Client URL:  /mapped/page Client viewing:  /faces/page.jsf After: Client URL:  /mapped/page Client viewing:  /faces/page.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Form postback with validation or navigation (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation: ( With) Redirect URL Rewriting Pattern ,[object Object],2. Server processes navigation and sends redirect to /mapped/page Again, with this solution, we have wasted bandwidth, even if we redisplay the same page. 4. Server renders /mapped/page 3. Client submits request for /mapped/page
(E.g.: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Pros / Cons Mapped JSF Navigation: ( With) Redirect URL Rewriting Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
<html> <body> <form action=“/mapped/page”> … </form> </body> </html> /mapped/page Web Client Before: Client URL:  /mapped/page Client viewing:  /faces/page.jsf After: Client URL:  /mapped/page Client viewing:  /faces/page.jsf PrettyFaces (Use the mapped URL as the form action) Mapped JSF Navigation: Proposed Solution Using the mapped page URL as the form action, instead of the JSF view ID, and doing conversion on the server, we solve several of our problems.
1. Client submits form to /mapped/page 2. Server processes navigation and renders new view Web Client JSF App Server Before: Client URL:  /mapped/page Client viewing:  /faces/page.jsf After: Client URL:  /mapped/page Client viewing:  /faces/page.jsf  or  /faces/page2.jsf Notice: The client’s URL will remain correct even after failed validation, or navigation back to the same page. PrettyFaces (Use the mapped URL as the form action) Mapped JSF Navigation: Proposed Solution
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PrettyFaces (Pros/Cons) Mapped JSF Navigation: Proposed Solution
pretty-config.xml <pretty-config> <url-mapping id=“viewProject”> <pattern> /project/#{viewProjectBean.projectId}/ </pattern> <view-id> #{viewProjectBean.getPrettyTarget} --or-- /faces/viewProject.jspx </view-id> <action method=“#{viewProjectBean.loadData}” /> <post-to-jsf-view /> </url-mapping> </pretty-config> PrettyFaces pretty-config.xml Mapped JSF Navigation: Proposed Solution Prevent manual link generation by using values in mapped EL property to generate dynamic URLs. Specify method(s) to be called after URL params are parsed Allow dynamic specification of view ID, for decoupling of URL from view Enable disabling of pretty-POST
PrettyFaces References Mapped JSF Navigation: Proposed Solution

Más contenido relacionado

La actualidad más candente

Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
Traxo Presentation - Facebook Garage Dallas 09
Traxo Presentation - Facebook Garage Dallas 09Traxo Presentation - Facebook Garage Dallas 09
Traxo Presentation - Facebook Garage Dallas 09Chris Stevens
 
Streamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web FrameworksStreamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web Frameworksguestf7bc30
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingRiwut Libinuko
 
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...Jamie Indigo
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideMark Rackley
 
iProspect - Tech SEO - Task - 17/12/2019
iProspect - Tech SEO - Task - 17/12/2019iProspect - Tech SEO - Task - 17/12/2019
iProspect - Tech SEO - Task - 17/12/2019Nick Samuel
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1Robert Nyman
 
Kailas by Wadit in YAPC::Asia 2009
Kailas by Wadit in YAPC::Asia 2009Kailas by Wadit in YAPC::Asia 2009
Kailas by Wadit in YAPC::Asia 2009Yusuke Wada
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQueryMark Rackley
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldEric Wu
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopMark Rackley
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDan Taylor
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesMark Rackley
 

La actualidad más candente (20)

Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Traxo Presentation - Facebook Garage Dallas 09
Traxo Presentation - Facebook Garage Dallas 09Traxo Presentation - Facebook Garage Dallas 09
Traxo Presentation - Facebook Garage Dallas 09
 
Sq li
Sq liSq li
Sq li
 
Streamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web FrameworksStreamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web Frameworks
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
 
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
 
iProspect - Tech SEO - Task - 17/12/2019
iProspect - Tech SEO - Task - 17/12/2019iProspect - Tech SEO - Task - 17/12/2019
iProspect - Tech SEO - Task - 17/12/2019
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
Kailas by Wadit in YAPC::Asia 2009
Kailas by Wadit in YAPC::Asia 2009Kailas by Wadit in YAPC::Asia 2009
Kailas by Wadit in YAPC::Asia 2009
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher World
 
Modelling Web Performance Optimization - FFSUx
Modelling  Web Performance Optimization - FFSUxModelling  Web Performance Optimization - FFSUx
Modelling Web Performance Optimization - FFSUx
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the Edge
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
Advanced Visualforce Webinar
Advanced Visualforce WebinarAdvanced Visualforce Webinar
Advanced Visualforce Webinar
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery Libraries
 
AEM - Client Libraries
AEM - Client LibrariesAEM - Client Libraries
AEM - Client Libraries
 

Destacado

JSF and Seam
JSF and SeamJSF and Seam
JSF and Seamyuvalb
 
Rare old photos
Rare old photosRare old photos
Rare old photosbrucem1967
 
Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)blahap
 
Skills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF UsersAndy Schwartz
 

Destacado (6)

JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
JSF and Seam
JSF and SeamJSF and Seam
JSF and Seam
 
Rare old photos
Rare old photosRare old photos
Rare old photos
 
Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)
 
Skills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 Tapestry
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF Users
 

Similar a Bookmarkable JSF: PrettyFaces

Silicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for ReusabilitySilicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for Reusabilityjcruizjdev
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverSpike Brehm
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Michael Kurz
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Michael Kurz
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Andriy Deren'
 
RichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummitRichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummitbalunasj
 
AK 5 JSF 21 july 2008
AK 5 JSF   21 july 2008AK 5 JSF   21 july 2008
AK 5 JSF 21 july 2008gauravashq
 
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesSharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesMuawiyah Shannak
 
Advanced RESTful Rails
Advanced RESTful RailsAdvanced RESTful Rails
Advanced RESTful RailsViget Labs
 
Advanced RESTful Rails
Advanced RESTful RailsAdvanced RESTful Rails
Advanced RESTful RailsBen Scofield
 
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 20132013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 2013Wes Preston
 

Similar a Bookmarkable JSF: PrettyFaces (20)

Silicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for ReusabilitySilicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for Reusability
 
Jsf 2.0 in depth
Jsf 2.0 in depthJsf 2.0 in depth
Jsf 2.0 in depth
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)
 
From MVC to React
From MVC to ReactFrom MVC to React
From MVC to React
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Single page applications - TernopilJS #2
Single page applications - TernopilJS #2Single page applications - TernopilJS #2
Single page applications - TernopilJS #2
 
RichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummitRichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummit
 
AK 5 JSF 21 july 2008
AK 5 JSF   21 july 2008AK 5 JSF   21 july 2008
AK 5 JSF 21 july 2008
 
AK 4 JSF
AK 4 JSFAK 4 JSF
AK 4 JSF
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overview
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Team vineyard2
Team vineyard2Team vineyard2
Team vineyard2
 
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesSharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
 
Advanced RESTful Rails
Advanced RESTful RailsAdvanced RESTful Rails
Advanced RESTful Rails
 
Advanced RESTful Rails
Advanced RESTful RailsAdvanced RESTful Rails
Advanced RESTful Rails
 
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 20132013 SPFest - Customizing Sites and Pages in SharePoint 2013
2013 SPFest - Customizing Sites and Pages in SharePoint 2013
 

Último

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Último (20)

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

Bookmarkable JSF: PrettyFaces

  • 1.
  • 2.
  • 3. 1. Client requests /faces/page.jsf 2. Server renders /faces/page.jsf Web Client JSF App Server Before: Client URL: N/A Client viewing: N/A After: Client URL: /faces/page.jsf Client viewing: /faces/page.jsf Step 1: Initial Request Standard JSF Navigation
  • 4.
  • 5.
  • 6. 1. Client requests /mapped/page 2. Server renders /faces/page.jsf Web Client JSF App Server Before: Client URL: N/A Client viewing: N/A After: Client URL: /mapped/page Client viewing: /faces/page.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Step 1: Initial Request (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation
  • 7. <html> <body> <form action=“/faces/page.jsf”> … </form> </body> </html> /mapped/page Web Client Before: Client URL: N/A Client viewing: N/A After: Client URL: /mapped/page Client viewing: /faces/page.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Rendered Output (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation Since JSF does not render the mapped URL, and instead renders the JSF view ID. After form submit, the URL will no longer be bookmarkable, or “pretty.”
  • 8. 1. Client submits form to /faces/page.jsf 2. Server processes navigation and renders new view Web Client JSF App Server Before: Client URL: /mapped/page Client viewing: /faces/page.jsf After: Client URL: /faces/page.jsf Client viewing: /faces/page.jsf or /faces/page2.jsf (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Form post-back with validation or navigation (Eg: PrettyUrlPhaseListener, RestFaces, JBoss Seam, …) Mapped JSF Navigation: ( Without) Redirect URL Rewriting Pattern Notice: On validation, the client’s URL will no longer be the mapped URL, and on navigation the URL will not reflect the current view.
  • 9.
  • 10.
  • 11.
  • 12. <html> <body> <form action=“/mapped/page”> … </form> </body> </html> /mapped/page Web Client Before: Client URL: /mapped/page Client viewing: /faces/page.jsf After: Client URL: /mapped/page Client viewing: /faces/page.jsf PrettyFaces (Use the mapped URL as the form action) Mapped JSF Navigation: Proposed Solution Using the mapped page URL as the form action, instead of the JSF view ID, and doing conversion on the server, we solve several of our problems.
  • 13. 1. Client submits form to /mapped/page 2. Server processes navigation and renders new view Web Client JSF App Server Before: Client URL: /mapped/page Client viewing: /faces/page.jsf After: Client URL: /mapped/page Client viewing: /faces/page.jsf or /faces/page2.jsf Notice: The client’s URL will remain correct even after failed validation, or navigation back to the same page. PrettyFaces (Use the mapped URL as the form action) Mapped JSF Navigation: Proposed Solution
  • 14.
  • 15. pretty-config.xml <pretty-config> <url-mapping id=“viewProject”> <pattern> /project/#{viewProjectBean.projectId}/ </pattern> <view-id> #{viewProjectBean.getPrettyTarget} --or-- /faces/viewProject.jspx </view-id> <action method=“#{viewProjectBean.loadData}” /> <post-to-jsf-view /> </url-mapping> </pretty-config> PrettyFaces pretty-config.xml Mapped JSF Navigation: Proposed Solution Prevent manual link generation by using values in mapped EL property to generate dynamic URLs. Specify method(s) to be called after URL params are parsed Allow dynamic specification of view ID, for decoupling of URL from view Enable disabling of pretty-POST
  • 16. PrettyFaces References Mapped JSF Navigation: Proposed Solution