<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5923777748740166020</id><updated>2011-04-21T11:22:08.286-07:00</updated><title type='text'>&gt;&gt;&gt; Thomas Spiegl's Blog &lt;&lt;&lt;</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jsfatwork.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5923777748740166020/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jsfatwork.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>tomsp</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp3.blogger.com/_VRUwJr4yGUY/R8yLVShMSGI/AAAAAAAAABM/pK_W4fnBgbs/S220/Thomas+Spiegl+130x160.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5923777748740166020.post-5293758830213952150</id><published>2008-03-12T15:46:00.000-07:00</published><updated>2008-03-12T16:12:00.845-07:00</updated><title type='text'>JSF @ Work</title><content type='html'>&lt;span style="font-family:arial;"&gt;(hosted on &lt;a href="http://code.google.com/p/jsfatwork"&gt;http://code.google.com/p/jsfatwork&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Lately I was thinking about doing a small JSF web application for my presentation "JSF@work" at &lt;/span&gt;&lt;a style="font-family: arial;" href="http://conference.irian.at/"&gt;JSFDays*08 in Vienna&lt;/a&gt;&lt;span style="font-family:arial;"&gt; hosted by IRIAN Solutions.  The application should be easy to understand, small &amp;amp; support rapid prototyping for my live presentation. I ended up using the following components:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: arial;"&gt;&lt;li&gt;&lt;a href="http://myfaces.apache.org/core12/index.html"&gt;MyFaces core&lt;/a&gt; 1.2.3 - JSF implementation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://myfaces.apache.org/tomahawk/index.html"&gt;MyFaces Tomahawk&lt;/a&gt; 1.1.7 - JSF component library&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://myfaces.apache.org/orchestra/index.html"&gt;MyFaces Orchestra &lt;/a&gt;1.1 - extended scopes (conversation, flash)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://facelets.dev.java.net/"&gt;Facelets &lt;/a&gt;1.14 - JSF view technology&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://springframework.org/"&gt;Spring &lt;/a&gt;2.5 - IOC container&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hibernate.org/"&gt;Hibernate &lt;/a&gt;3.3.1.ga - &lt;a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/"&gt;JPA &lt;/a&gt;persistence layer&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://hsqldb.org/"&gt;hsqldb &lt;/a&gt;1.8 - database&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://oval.sourceforge.net/"&gt;OVal &lt;/a&gt;1.10 - object validation framework&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;To see the application in action:&lt;br /&gt;a) download the source archive from &lt;a href="http://code.google.com/p/jsfatwork/downloads/list"&gt;&lt;/a&gt;&lt;a href="http://jsfatwork.googlecode.com/files/jsfatwork1-0.zip"&gt;http://jsfatwork.googlecode.com/files/jsfatwork1-0.zip&lt;/a&gt;&lt;br /&gt;b) run it using maven2:  mvn tomcat:run&lt;br /&gt;&lt;br /&gt;MyFaces, Hibernate &amp;amp; Spring are each proved technologies working very well, but h&lt;/span&gt;&lt;span style="font-family:arial;"&gt;ow to conflate all these libraries to a working web application? In the past questions like this caused headaches among many JSF web programmers. What's needed is a glue code that integrates the stack. That's where MyFaces Orchestra comes into play. Orchestra is a lightweight integration library that solves two of the main existing JSF issues:&lt;br /&gt;&lt;/span&gt;&lt;ul style="font-family: arial;"&gt;&lt;li&gt;missing extended scopes&lt;/li&gt;&lt;li&gt;missing long unit of work pattern for a better integration with JPA&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;Even more orchestra could be used with other Java web technologies, eg. Struts - but that's another story. Let's take a closer look at the two missing JSF concepts.&lt;br /&gt;&lt;br /&gt;In general it's a good practice to keep the state of your beans as long as necessary but as short as possible. Therefore a scope is needed, shorter than the http session but one that can outlast more than one request. Access/Flash or Manual/Conversation scopes last in between session and request scopes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Flash scoped beans&lt;/span&gt; are kept in memory for the subsequent request as long as they are getting referenced during the processing of one request. A &lt;span style="font-weight: bold;"&gt;conversation scope&lt;/span&gt; starts at  certain defined entry views (pages) and has to be ended manually. Think of a wizard using several views to collect data from the user, whereas action "save to database" may be a valid exit point to invalidate the running conversation and it's state (see also Orchestra &lt;/span&gt;&lt;a style="font-family: arial;" href="http://myfaces.apache.org/orchestra/myfaces-orchestra-core/viewController.html"&gt;ViewController&lt;/a&gt;&lt;span style="font-family:arial;"&gt; pattern).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5923777748740166020-5293758830213952150?l=jsfatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsfatwork.blogspot.com/feeds/5293758830213952150/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5923777748740166020&amp;postID=5293758830213952150' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5923777748740166020/posts/default/5293758830213952150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5923777748740166020/posts/default/5293758830213952150'/><link rel='alternate' type='text/html' href='http://jsfatwork.blogspot.com/2008/03/jsf-work.html' title='JSF @ Work'/><author><name>tomsp</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp3.blogger.com/_VRUwJr4yGUY/R8yLVShMSGI/AAAAAAAAABM/pK_W4fnBgbs/S220/Thomas+Spiegl+130x160.jpg'/></author><thr:total>0</thr:total></entry></feed>
