Beautiful Java EE: URL-rewriting for the
next generation web-user
Lincoln Baxter, III – JBoss by Red Hat, Inc.
prettyfaces
22
#devoxx #prettyfaces
( At this time, the audience is
encouraged to use PDAs, cell
phones, and other portable
electronic...
3
Lincoln Baxter, III (@lincolnthree, @ocpsoft)
●
Senior Software Engineer – JBoss, by Red Hat – Seam Team
●
Expert Group ...
4
/ PrettyFaces
/ background
/ basics
/ demo
/ conclusion
URL-rewriting for Servlet, JSF, and Java EE with:
5
• Initially developed as a URL-rewriting extension for
Java Server Faces.
– Enabled bookmarks in JSF 1.2
• Grown to beco...
6
http://www.llbean.com/webapp/wcs/stores/servlet/
CategoryDisplay?
categoryId=28&storeId=1&catalogId=1&langId=-
1&nav=hp-...
7
It should have been...
http://llbean.com/kids
8
/ PrettyFaces
/ background
/ basics
/ demo
/ conclusion
9
PrettyFaces is...
“A URL rewriting extension for Servlet containers, Java
EE, with optional tight-integration for JSF an...
10
<url-mapping>
<pattern value = ”/store” />
<view-id> /faces/store.xhtml </view-id>
</url-mapping>
http://example.com/st...
11
PrettyFaces is...
“A URL parameterization framework.”
12
<url-mapping>
<pattern value =
”/store/#{ category }/#{ item }” />
<view-id> /faces/store.xhtml </view-id>
</url-mappin...
13
<url-mapping>
<pattern value =
”/store/#{ category }/#{ item }” />
<view-id> /faces/store.xhtml </view-id>
</url-mappin...
14
PrettyFaces is...
“An action framework for JSF.”
15
<url-mapping>
<pattern value =
”/store/#{ category }/#{ item }” />
<view-id> /faces/store.xhtml </view-id>
<action> #{ ...
16
PrettyFaces is...
“A simplified navigation framework for JSF.”
17
public String loadItem()
{
if( itemNotFound ) {
addMessage(“Sorry, we could not find that
item.”);
return “pretty:store...
18
<url-mapping id=”store”>
<pattern value = ”/store” />
<view-id> /faces/store.xhtml </view-id>
</url-mapping>
19
PrettyFaces is...
“Extendable, configurable.”
20
com.ocpsoft.pretty.faces.spi.ConfigurationProvider
com.ocpsoft.pretty.faces.spi.ConfigurationPostProcessor
com.ocpsoft....
21
PrettyFaces is...
“Freedom to choose.”
22
“The future is not set.”
.jsp
.jsf
.php
???
.do
.cgi
.asp
23
“There is no fate,
but what we make for ourselves.”
/
24
/ PrettyFaces
/ background
/ basics
/ demo
/ conclusion
Demo
26
/ PrettyFaces
/ background
/ basics
/ demo
/ conclusion
27
• URL-rewriting
• URL-parameterization
• Action-framework for JSF (Servlet soon)
• Navigation framework for JSF (Servle...
28
“Beautiful Java EE: URL-rewriting for the next
generation web-user”
PrettyFaces is...
29
?GET /PrettyFaces?slide=questions
of 29

PrettyFaces URLRewrite for Servlet & JavaEE @ Devoxx 2010

PrettyFaces presentation at Devoxx 2010
Published on: Mar 4, 2016
Published in: Technology      
Source: www.slideshare.net


Transcripts - PrettyFaces URLRewrite for Servlet & JavaEE @ Devoxx 2010

  • 1. Beautiful Java EE: URL-rewriting for the next generation web-user Lincoln Baxter, III – JBoss by Red Hat, Inc. prettyfaces
  • 2. 22 #devoxx #prettyfaces ( At this time, the audience is encouraged to use PDAs, cell phones, and other portable electronic devices... )
  • 3. 3 Lincoln Baxter, III (@lincolnthree, @ocpsoft) ● Senior Software Engineer – JBoss, by Red Hat – Seam Team ● Expert Group Member (jcp.org) of JavaServer Faces and #{EL.next} ● Open-source advocate (addict) ● Founder of http://ocpsoft.com/ ● Creator of PrettyFaces & PrettyTime utilities for Java EE & Java ● http://seamframework.org ● http://jboss.org
  • 4. 4 / PrettyFaces / background / basics / demo / conclusion URL-rewriting for Servlet, JSF, and Java EE with:
  • 5. 5 • Initially developed as a URL-rewriting extension for Java Server Faces. – Enabled bookmarks in JSF 1.2 • Grown to become feature-rich as more users contribute. • Does what you mean, and what you say. • Now evolving beyond JSF, into pure Servlet and Java EE.
  • 6. 6 http://www.llbean.com/webapp/wcs/stores/servlet/ CategoryDisplay? categoryId=28&storeId=1&catalogId=1&langId=- 1&nav=hp-gndp http://www.llbean.com/webapp/wcs/stores/servlet/ CategoryDisplay? categoryId=28&storeId=1&catalogId=1&langId=- 1&nav=hp-gndp It's about avoiding this... Vulnerable! Cluttered! Real­life: wtf? wtf?
  • 7. 7 It should have been... http://llbean.com/kids
  • 8. 8 / PrettyFaces / background / basics / demo / conclusion
  • 9. 9 PrettyFaces is... “A URL rewriting extension for Servlet containers, Java EE, with optional tight-integration for JSF and other frameworks.”
  • 10. 10 <url-mapping> <pattern value = ”/store” /> <view-id> /faces/store.xhtml </view-id> </url-mapping> http://example.com/store http://example.com/faces/store.xhtml
  • 11. 11 PrettyFaces is... “A URL parameterization framework.”
  • 12. 12 <url-mapping> <pattern value = ”/store/#{ category }/#{ item }” /> <view-id> /faces/store.xhtml </view-id> </url-mapping> http://example.com/store/shoes/xrunner-pro request.getParameter(“category”) == “shoes” request.getParameter(“item”) == “xrunner-pro”
  • 13. 13 <url-mapping> <pattern value = ”/store/#{ category }/#{ item }” /> <view-id> /faces/store.xhtml </view-id> </url-mapping> http://example.com/store/shoes/xrunner-pro http://example.com/faces/store.xhtml?category=shoes&item=xrunner-pro + =
  • 14. 14 PrettyFaces is... “An action framework for JSF.”
  • 15. 15 <url-mapping> <pattern value = ”/store/#{ category }/#{ item }” /> <view-id> /faces/store.xhtml </view-id> <action> #{ storeBean.loadItem } </action> </url-mapping> http://example.com/store/shoes/xrunner-pro public String loadItem() { ... }
  • 16. 16 PrettyFaces is... “A simplified navigation framework for JSF.”
  • 17. 17 public String loadItem() { if( itemNotFound ) { addMessage(“Sorry, we could not find that item.”); return “pretty:store”; → http://example.com/store } else { return null; } }
  • 18. 18 <url-mapping id=”store”> <pattern value = ”/store” /> <view-id> /faces/store.xhtml </view-id> </url-mapping>
  • 19. 19 PrettyFaces is... “Extendable, configurable.”
  • 20. 20 com.ocpsoft.pretty.faces.spi.ConfigurationProvider com.ocpsoft.pretty.faces.spi.ConfigurationPostProcessor com.ocpsoft.pretty.faces.spi.ELBeanNameResolver … com.ocpsoft.pretty.faces.spi.More ?
  • 21. 21 PrettyFaces is... “Freedom to choose.”
  • 22. 22 “The future is not set.” .jsp .jsf .php ??? .do .cgi .asp
  • 23. 23 “There is no fate, but what we make for ourselves.” /
  • 24. 24 / PrettyFaces / background / basics / demo / conclusion
  • 25. Demo
  • 26. 26 / PrettyFaces / background / basics / demo / conclusion
  • 27. 27 • URL-rewriting • URL-parameterization • Action-framework for JSF (Servlet soon) • Navigation framework for JSF (Servlet soon) • Extendable, configurable • Doing what you mean, and what you say. • Waiting for your ideas! PrettyFaces is...
  • 28. 28 “Beautiful Java EE: URL-rewriting for the next generation web-user” PrettyFaces is...
  • 29. 29 ?GET /PrettyFaces?slide=questions

Related Documents