<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>OcpSoft &#187; Uncategorized</title> <atom:link href="http://ocpsoft.com/cat/uncategorized/feed/" rel="self" type="application/rss+xml" /><link>http://ocpsoft.com</link> <description>&#34;Simple Software&#34;</description> <lastBuildDate>Tue, 27 Jul 2010 15:07:50 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>20th Anniversary of a Photograph</title><link>http://ocpsoft.com/uncategorized/20th-anniversary-of-a-photograph/</link> <comments>http://ocpsoft.com/uncategorized/20th-anniversary-of-a-photograph/#comments</comments> <pubDate>Fri, 12 Feb 2010 16:29:29 +0000</pubDate> <dc:creator>Lincoln</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://ocpsoft.com/?p=1074</guid> <description><![CDATA[Take a break from your software to read this: Today (February 12, 2010) marks the 20th anniversary of a remarkably simple, unimportant, yet incredibly special and sentimental event. A perspective that few consider in their daily lives. I sometimes get caught in the daily grind, worry about things that &#8230; maybe aren&#8217;t so important. There [...]]]></description> <content:encoded><![CDATA[<p>Take a break from your software to read this: Today (February 12, 2010) marks the 20th anniversary of a remarkably simple, unimportant, yet incredibly special and sentimental event. A perspective that few consider in their daily lives.<span
id="more-1074"></span></p><p>I sometimes get caught in the daily grind, worry about things that &#8230; maybe aren&#8217;t so important. There are bigger ideas out there, and I find a small sense of peace when I think about our lives in the context of something so vast and unknown.</p><p>Take a few minutes to read the entire <a
target="_blank" href="http://www.npr.org/templates/story/story.php?storyId=123614938">article on NPR</a>.</p><div
class="featured"><table
cellspacing="15px"><tr><td><a
href="http://www.npr.org/templates/story/story.php?storyId=123614938"><img
style="border: solid 2px #333;" src="http://ocpsoft.com/wp-content/uploads/2010/02/voyager_1_earth.jpg" alt="The voyager 1 spacecraft takes a picture of Earth from almost 4 billion miles away." title="voyager_1_earth" class="alignnone size-full wp-image-1077" /></a></td><td><div
class="inside">&#8220;Look again at that dot. That&#8217;s here. That&#8217;s home. That&#8217;s us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every &#8216;superstar,&#8217; every &#8216;supreme leader,&#8217; every saint and sinner in the history of our species lived there — on a mote of dust suspended in a sunbeam.&#8221; ~<a
target="_blank" href="http://en.wikipedia.org/wiki/Carl_sagan">Carl Sagan</a></div></td></tr></table></div><p>Thank you, Carl Sagan, for such a clear and unburdened view of our world.</p> ]]></content:encoded> <wfw:commentRss>http://ocpsoft.com/uncategorized/20th-anniversary-of-a-photograph/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PrettyFaces 1.2.2 Released</title><link>http://ocpsoft.com/uncategorized/prettyfaces-122-released/</link> <comments>http://ocpsoft.com/uncategorized/prettyfaces-122-released/#comments</comments> <pubDate>Tue, 27 Jan 2009 21:54:16 +0000</pubDate> <dc:creator>Lincoln</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://ocpsoft.com/?p=39</guid> <description><![CDATA[A new minor release of the PrettyFaces JSF extension for Bookmarkable/Pretty URLs is now available for download. PrettyFaces is now backwards compatible with Java 5. Version 1.2.2: binary, source]]></description> <content:encoded><![CDATA[<p>A new minor release of the <a
href="http://ocpsoft.com/prettyfaces">PrettyFaces</a> JSF extension for Bookmarkable/Pretty URLs is now available for download.</p><p>PrettyFaces is now backwards compatible with Java 5.</p><p><strong>Version 1.2.2</strong>: <a
href="http://prettyfaces.googlecode.com/files/ocpsoft-pretty-faces-1.2.2.jar">binary</a>, <a
href="http://prettyfaces.googlecode.com/files/ocpsoft-pretty-faces-1.2.2-sources.jar">source</a></p> ]]></content:encoded> <wfw:commentRss>http://ocpsoft.com/uncategorized/prettyfaces-122-released/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Make JSF intuitive, with bookmarkable and pretty URLs</title><link>http://ocpsoft.com/uncategorized/jsf-get-bookmarkable-and-pretty-urls/</link> <comments>http://ocpsoft.com/uncategorized/jsf-get-bookmarkable-and-pretty-urls/#comments</comments> <pubDate>Thu, 13 Nov 2008 06:28:01 +0000</pubDate> <dc:creator>Lincoln</dc:creator> <category><![CDATA[JSF]]></category> <category><![CDATA[OpenSource]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[Pretty URL]]></category> <category><![CDATA[PrettyFaces]]></category><guid
isPermaLink="false">http://ocpsoft.com/?p=24</guid> <description><![CDATA[What makes Pretty URLs in JSF so hard, and so slow? Speed up development, reduce bandwidth, enhance user experience. This article gives a brief overview of JSF navigation, some of the problems, and potentially how to solve them by enabling bookmarkable, pretty URLs. Put simply&#8230; in my view, out of the box, JSF is a [...]]]></description> <content:encoded><![CDATA[<h2>What makes Pretty URLs in JSF so hard, and so slow?</h2><p>Speed up development, reduce bandwidth, enhance user experience. This article gives a brief overview of JSF navigation, some of the problems, and potentially how to solve them by enabling bookmarkable, pretty URLs. Put simply&#8230; in my view, out of the box, JSF is a web framework designed for web-<em>applications</em>, not designed for web-<em>sites. <a
href="http://ocpsoft.com/prettyfaces/">PrettyFaces</a> addresses most of these issues.<br
/> </em></p><h3>Target audience for this article:</h3><ol><li>The reader is familiar with JSF navigation.</li><li>The reader is attempting to create a JSF app with bookmarkable &#8220;pretty&#8221; URLs. E.g.: &#8230;/mysite/archives/2008/11/11/</li><li>The reader is familiar with HTTP request/response at a basic level.</li></ol><p><span
id="more-24"></span></p><h3>The difference between a web-application / web-site</h3><h4>When I think of a web-site, I think of a group of pages having:</h4><ul><li>Multiple points of entry</li><li>Navigation via &lt;a href&gt; or &lt;form&gt; HTML elements.</li><li>Mostly stateless; the application may care who you are, but usually does not care where you came from, or where you have been.</li></ul><h4>When I think of a web-application, I think of a group of pages having:</h4><ul><li>One or only a few points of entry (login page, etc. No direct links.)</li><li>Navigation via page-flows.</li><li>Mostly stateful; the application cares who you are and where you have been.</li></ul><p>So when I say that JSF was designed for applications, I mean that without extension, normal, mostly-stateless web-behavior can be more difficult to implement than stateful web-behavior. The problem here, however, is that if a web-site is &#8220;stateless,&#8221; JSF forces you to behave in a stateful way. Here&#8217;s why.</p><h3>&lt;h:form&gt; &#8211; the root of the problem</h3><p>Forms in JSF are rendered by the &lt;h:form&gt; component, and each form must post back to the viewId from which it was rendered (aptly named a postback.) Once the form has been submitted back to the requested URL, JSF will determine which page the user should see next, and either render that view, or redirect the client&#8217;s browser to a new URL.</p><ul><li>An example view Id: <em>&#8230;/mysite/faces/articles/viewArchives.jsf</em></li></ul><p>There are a few existing frameworks to get our bookmarkable URLs, but all suffer from a troubling set of problems:</p><ol><li><a
href="https://restfaces.dev.java.net/">Restfaces</a> &#8211; solely intended to manage Pretty/Bookmarkable JSF navigation</li><li><a
href="https://javaserverfaces.dev.java.net/sandbox/components/prettyUrl.html" target="_blank">PrettyUrlPhaseListener</a> &#8211; a small utility provided in the sandbox for Mojarra Scales</li><li><a
href="http://tuckey.org/urlrewrite/">UrlRewriteFilter</a>Cannot process unordered query-parameters reliably: &#8216;?foo=1&#038;bar=2&#8242; vs. &#8216;?bar=2&#038;foo=1&#8242;</li></ol><p>And most serious solutions have heavyweight configurations with a steep learning-curve.</p><h4>Problems:</h4><ul><li>When you submit a form, the JSF view ID is shown in the URL bar instead of the Pretty URL. This occurs for validation and also standard navigation without server-side redirects.</li><li>When form validation occurs, the view ID is again shown in the URL bar. This causes contextual information contained in the URL to be lost. The information must instead be rendered as hidden form input fields, and re-submitted with the form. The developer must now manually process these values and reload them in <em>every</em> action method. The other option is to make your managed beans &#8220;session&#8221; scoped, which causes other problems.</li><li>Mulitple requests to preserve the URL mean wasted bandwidth, longer client wait times, and higher CPU utilization.</li></ul><h2>A proposed solution</h2><p>It&#8217;s simple, really&#8230; Modify JSF to submit the form to the pretty URL<em> (/mapped/page)</em> instead of the view Id <em>(/faces/page.jsf)</em></p><ul><li>An example PrettyFaces URL: <em>&#8230;/mysite/archives/2008/11/11/</em></li></ul><p>(Read through the presentation to see why PrettyFaces, a new OpenSource library by OcpSoft, may be a good alternative)</p><p
style="text-align: center;">&#8212;-</p><h3>How to make JSF bookmarkable like a web-<em>site</em>, not behave like an <em>application</em>.</h3><div
id="__ss_739738" style="width: 425px; text-align: left;"><a
style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Bookmarkable JSF: Pretty4JSF" href="http://www.slideshare.net/lincolnthree/bookmarkable-jsf-pretty4jsf-presentation?type=powerpoint">Bookmarkable JSF: Pretty4JSF</a><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="allowFullScreen" value="true" /><param
name="allowScriptAccess" value="always" /><param
name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=prettybookmarkablejsf-1226356164820988-8&amp;rel=0&amp;stripped_title=bookmarkable-jsf-pretty4jsf-presentation" /><embed
type="application/x-shockwave-flash" width="425" height="355" src="http://static.slideshare.net/swf/ssplayer2.swf?doc=prettybookmarkablejsf-1226356164820988-8&amp;rel=0&amp;stripped_title=bookmarkable-jsf-pretty4jsf-presentation" allowscriptaccess="always" allowfullscreen="true"></embed></object></p><div
style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View SlideShare <a
style="text-decoration:underline;" title="View Bookmarkable JSF: Pretty4JSF on SlideShare" href="http://www.slideshare.net/lincolnthree/bookmarkable-jsf-pretty4jsf-presentation?type=powerpoint">presentation</a> or <a
style="text-decoration:underline;" href="http://www.slideshare.net/upload?type=powerpoint">Upload</a> your own. (tags: <a
style="text-decoration:underline;" href="http://slideshare.net/tag/jsf">jsf</a> <a
style="text-decoration:underline;" href="http://slideshare.net/tag/url">url</a>)</div></div><p
style="text-align: center;">&#8212;-</p><h2>Conclusion:</h2><p>When the form is submitted to the pretty URL instead of the JSF view ID, you gain performance, save resources, and make life for the developer easier; parameter values are not lost, and do not need to be coded into the form or session scoped beans.</p><p>Try <a
href="http://ocpsoft.com/prettyfaces/">PrettyFaces</a>, an opensource solution by OcpSoft. (Check the project homepage, <a
href="http://ocpsoft.com/prettyfaces/">here</a>).</p> ]]></content:encoded> <wfw:commentRss>http://ocpsoft.com/uncategorized/jsf-get-bookmarkable-and-pretty-urls/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> </channel> </rss>
<!-- Served from: ocpsoft.com @ 2010-07-29 17:19:31 by W3 Total Cache -->