<?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>byte bohemian &#187; JSF</title>
	<atom:link href="http://nicl.net/category/technology/java/j2ee/jsf/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicl.net</link>
	<description></description>
	<lastBuildDate>Sat, 15 May 2010 20:51:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating dynamic PDF, or another reason to like Apache Tapestry</title>
		<link>http://nicl.net/2009/08/creating-dynamic-pdf-or-another-reason-to-like-apache-tapestry/</link>
		<comments>http://nicl.net/2009/08/creating-dynamic-pdf-or-another-reason-to-like-apache-tapestry/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 20:40:29 +0000</pubDate>
		<dc:creator>niclas</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[The Flying Saucer Project]]></category>

		<guid isPermaLink="false">http://nicl.net/?p=45</guid>
		<description><![CDATA[I am using Apache Tapestry 5 on my job since February of this year. Today was another of these days when I am pretty sure why it is a good idea to use this framework.
Last week we started the new sprint for the scoyo feature release which will be release on end of September. A [...]]]></description>
			<content:encoded><![CDATA[<p>I am using <a href="http://tapestry.apache.org/">Apache Tapestry 5</a> on my job since February of this year. Today was another of these days when I am pretty sure why it is a good idea to use this framework.<br />
<span id="more-45"></span>Last week we started the new sprint for the <a href="http://www-de.scoyo.com">scoyo</a> feature release which will be release on end of September. A website feature may require the dynamic creation of PDF files so I evaluated the possibilities of the <a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer Project"</a>, a XML/XHTML/CSS 2.1 rendering engine.</p>
<p>I already made some experiences with the <a href="https://xhtmlrenderer.dev.java.net/">Flying Saucer</a> on another job and it is still a very nice framework for PDF creation. For me, a major advantage of <a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer"</a> over other PDF creation frameworks, like XSLT and <a href="http://xmlgraphics.apache.org/fop/">FOP</a>, in the Web world is the homogenous technology mix.</p>
<p><a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer Project"</a> create PDF from XML/XHTML pages using CSS style sheets. All technologies known to the web designer that gives your web site this pretty look. I guess it's okay when you say, that XSLT and <a href="http://xmlgraphics.apache.org/fop/">FOP</a> is the more powerful technology mix, but styling pages on this technology mix is not a simple task to do.</p>
<p>So back to the initial topic: A basic ingredient which is needed to create PDFs with the <a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer Project"</a> is some XHTML. In our project at <a href="http://www-de.scoyo.com">scoyo</a> we wanted to use <a href="http://tapestry.apache.org/">Apache Tapestry</a> to create this XHTML.</p>
<p>After taking a closer look to the <a href="http://tapestry.apache.org/">Apache Tapestry</a> rendering pipeline I found out, that the <code>PageResponseRenderer</code> is the perfect place to hook up the PDF creation into the rendering process. On the one hand the <code>PageResponseRenderer</code> uses a <code>MarkupWriter</code> to create the (X)HTML content from the current <code>Page</code> instance. On the other hand the <code>PageResponseRenderer</code> is responsible for writing the generated content into the server response.</p>
<p>Using the <a href="http://tapestry.apache.org/">Apache Tapestry</a> own IoC mechanism it's quite an easy task to decorate the <a href="http://tapestry.apache.org/">Tapestry</a>  <code>PageResponseRenderer</code> implementation. It's a beautiful mechanism when you understood how it works. Okay I guess using the 5.1 version of tapestry it would be better to advice the <code>renderPageResponse(...)</code> method, but I had not enough time to get familiar with it yet.</p>
<p>One real big plus on <a href="http://tapestry.apache.org/">Apache Tapestry</a> is the implementation. Every function is well encapsulated into separate services. And the service implementing classes are very short and almost always on consistent level of abstraction. So you easily understand how a service works and you are able to copy and extend the service functions. So I extended <code>PageResponseRenderer</code> to determine if a page creates XHTML output which should be transformed to PDF. If no PDF should be created my <code>PageResponseRenderer</code> simply delegates to the original Tapestry instance.</p>
<p>When the page wants to create PDF my <code>PageResponseRenderer</code> buffers the created content and redirects it into the <code>ITextRenderer</code> of the a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer". Okay this sounds more nice, than it actually is. The content is stored into a <code>ByteArrayOutputStream</code> and re-parsed by the standard JDK XML parser for further processing by the <code>ITextRenderer</code>. But I guess the we will live with the performance impact until it gets a real issue.</p>
<p>So long explanation short story. The whole thing worked out great! It took me like two to three hours to implement a first prototype. In out web application. This also includes the embedding of custom fonts into the PDF and a nice discovery of pages to render into PDF, via custom annotations using the component model meta-data facilities and a <code>ClassTransformationWorker</code>.</p>
<p>Web development can be so easy when you are using <a href="http://tapestry.apache.org/">Apache Tapestry</a>. On an earlier project we used a similar architacture with JSP and the <a href="https://xhtmlrenderer.dev.java.net/">"The Flying Saucer"</a>. I guess it took us ten times the effort to establish an equal infrastructure using JSF and the Java Servlet API ...</p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2009/08/creating-dynamic-pdf-or-another-reason-to-like-apache-tapestry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New jaev Release</title>
		<link>http://nicl.net/2009/07/new-jaev-release/</link>
		<comments>http://nicl.net/2009/07/new-jaev-release/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:42:16 +0000</pubDate>
		<dc:creator>niclas</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[google wave]]></category>
		<category><![CDATA[jaev]]></category>

		<guid isPermaLink="false">http://nicl.net/?p=41</guid>
		<description><![CDATA[Today I made a new release of the jaev Framework for "advanced" e-mail validation. After being in productive use for quite some month now it was about time to offer a bugfix release. Some issues with domains containing no MX but an A DNS record where resolved. E-mail belonging to this kind of domains will [...]]]></description>
			<content:encoded><![CDATA[<p>Today I made a new release of the <a href="http://jaev.googlecode.com">jaev Framework</a> for "advanced" e-mail validation. After being in productive use for quite some month now it was about time to offer a bugfix release. Some issues with domains containing no MX but an A DNS record where resolved. E-mail belonging to this kind of domains will now be accepted. An issue with a file handle leak due to unclosed UDP connections during the DNS lookup was also fixed.</p>
<p>Due to the generosity of Google I got a nice <a href="http://wave.google.com/">Google wave</a> test account. Now I am looking desperately to some spare time to evaluate the integration of <a href="http://jaev.googlecode.com">jaev</a> to the <a href="http://wave.google.com/">wave</a>. One idea is to expand the validation to wave addresses via the <a href="http://www.waveprotocol.org/">wave protocol</a>. Maybe an online validation as wave bot is another exciting idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2009/07/new-jaev-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jaev 1.0 released</title>
		<link>http://nicl.net/2009/05/jaev-10-released/</link>
		<comments>http://nicl.net/2009/05/jaev-10-released/#comments</comments>
		<pubDate>Sat, 30 May 2009 10:31:11 +0000</pubDate>
		<dc:creator>niclas</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[jaev]]></category>

		<guid isPermaLink="false">http://87.106.3.237/?p=35</guid>
		<description><![CDATA[After some weeks the third release candidate of the jaev was the final one yesterday.
The jaev framework is in productional use at least one installation and no major problems where filed so far. I'm keeping my fingers crossed  
I am working already on some new features:

Caching negative responses of mail serversWhen a mail server [...]]]></description>
			<content:encoded><![CDATA[<p>After some weeks the third release candidate of the <a href="http://code.google.com/p/jaev/">jaev</a> was the final one yesterday.</p>
<p>The <a href="http://code.google.com/p/jaev/">jaev</a> framework is in productional use at least one installation and no major problems where filed so far. I'm keeping my fingers crossed <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I am working already on some new features:</p>
<ul>
<li>Caching negative responses of mail servers<br />When a mail server refuses communication due to suspected spam, the result will be cached to reduce network traffic.</li>
<li>Suggest e-mail addresses<br />When the validation fails suggest a list e-mail addresses. This algorithm may use the previous request and a default list of domains to compute some suggestions.</li>
</ul>
<p>If you have any good ideas, file them on the <a href="http://code.google.com/p/jaev/issues/list">issue tracking system</a> or the <a href="http://groups.google.com/group/jaev-users/topics">google group</a>.</p>
<p>Maybe I am applying for a <a href="http://wave.google.com">google wave</a> developer sandbox access to provide a <a href="http://wave.google.com">google wave</a> robot for online e-mail suggestion. Bah, that sounds like some work <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2009/05/jaev-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSF 2.0 RI EDR1 &#8230; getting mature</title>
		<link>http://nicl.net/2008/06/jsf-20-ri-edr1-getting-mature/</link>
		<comments>http://nicl.net/2008/06/jsf-20-ri-edr1-getting-mature/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 12:48:04 +0000</pubDate>
		<dc:creator>niclas</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://nicl.net/2008/06/29/jsf-20-ri-edr1-getting-mature/</guid>
		<description><![CDATA[Friday evening I read about the new version of JSF. The reference implementation (RI) Mojarra made an early draft review (EDR) of Mojarra 2.0 which implements the lastest specification of the JSR-314 which features JavaServer Faces (JSF) 2.0.

Friday evening I read about the new version of JSF. The reference implementation (RI) Mojarra made an early [...]]]></description>
			<content:encoded><![CDATA[<p>Friday evening I read about the new version of JSF. The reference implementation (RI) Mojarra made an early draft review (EDR) of Mojarra 2.0 which implements the lastest specification of the JSR-314 which features JavaServer Faces (JSF) 2.0.<br />
<span id="more-11"></span></p>
<p>Friday evening I read about the new version of JSF. The reference implementation (RI) Mojarra made an early draft review (EDR) of Mojarra 2.0 which implements the lastest specification of the JSR-314 which features JavaServer Faces (JSF) 2.0.</p>
<p>I don't want so summarize alle the new little gizmos in the JSF 2.0 spec or the EDR, <a href="http://blogs.sun.com/rlubke/">Ryan Lubke</a> does this in his<a href="http://blogs.sun.com/rlubke/"> blog</a> already. There will be a long way to go to finish all the issues of the JSR but I can't stand to comment the one or other thing.</p>
<p>Like i.e. the project stage feature. Damn I am doing this like this for years in my application. It's a wonderful way to tell the application how many secrets have to be kept in this environment.<br />
In a test environment I like the application to be very verbose and tell my of every little affliction, but in productive envorinments the application has to be very reticent. I don't want to tell the bad guys out there all over the internet about the flaws in the application.<br />
One thing I am still missing, which goes hand in hand with project stages in my appliations it the version number. The application provides facilities to access the version number of the application and display it in any page. A wonderful tools to communicate with our QA department. They can check the version history if an issues was solved in the current version deployed on the test and QA system and they don't have to recheck about the version with me every time.</p>
<p>Another nice feature I noticed is, that in JSF 2.0 the component tree may be aware of the head and body areas in a HTML page. So it now should be quite easy to add CSS and Java-Scipts to a page. This may end some nasty implementations to re-parse the rendered output before it's send to the client to add CSS or Java-Scripts to the header. Or worse the tons of inline Java-Script code.<br />
Let's be honest most of the HTML code generated by JSF is quite a horror and the frontend engineers are hating it a long time. Maybe we'll get some really nice HTML code now, so we don't need any more perfomace hacks to accellerate the bad HTML code.</p>
<p>I will keep an eye on the JSF 2.0 spec, it may solve much of the pain I have to today using JSF ...</p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2008/06/jsf-20-ri-edr1-getting-mature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
