Your SlideShare is downloading. ×
PrettyFaces URLRewrite for Servlet & JavaEE @ Devoxx 2010
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

PrettyFaces URLRewrite for Servlet & JavaEE @ Devoxx 2010

4,769
views

Published on

PrettyFaces presentation at Devoxx 2010

PrettyFaces presentation at Devoxx 2010

Published in: Technology

1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
4,769
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
1
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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