prettyfaces urlrewrite for servlet & javaee @ devoxx 2010

Download PrettyFaces URLRewrite for Servlet & JavaEE @ Devoxx 2010

If you can't read please download the document

Upload: lincoln-iii

Post on 17-May-2015

4.794 views

Category:

Technology


3 download

DESCRIPTION

PrettyFaces presentation at Devoxx 2010

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! Reallife: wtf? wtf? 7. 7 It should have been... http://llbean.com/kids 8. 8 / PrettyFaces / background / basics / demo / conclusion 9. 9 PrettyFacesis... A URL rewriting extension for Servlet containers, Java EE, with optional tight-integration for JSF and other frameworks. 10. 10 /faces/store.xhtml http://example.com/store http://example.com/faces/store.xhtml 11. 11 PrettyFacesis... A URL parameterization framework. 12. 12 /faces/store.xhtml http://example.com/store/shoes/xrunner-pro request.getParameter(category) == shoes request.getParameter(item) == xrunner-pro 13. 13 /faces/store.xhtml http://example.com/store/shoes/xrunner-pro http://example.com/faces/store.xhtml?category=shoes&item=xrunner-pro + = 14. 14 PrettyFacesis... An action framework for JSF. 15. 15 /faces/store.xhtml #{ storeBean.loadItem } http://example.com/store/shoes/xrunner-pro public String loadItem() { ... } 16. 16 PrettyFacesis... 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 /faces/store.xhtml 19. 19 PrettyFacesis... 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 PrettyFacesis... 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! PrettyFacesis... 28. 28 Beautiful Java EE: URL-rewriting for the next generation web-user PrettyFacesis... 29. 29 ?GET /PrettyFaces?slide=questions