<?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>SYNFORMATION &#187; Development</title>
	<atom:link href="http://blog.synformation.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.synformation.com</link>
	<description>About a Java framework and other things</description>
	<lastBuildDate>Wed, 26 May 2010 07:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ForzaDroid, Forza Motorsport 3 suspension calculator for Android</title>
		<link>http://blog.synformation.com/2010/01/13/forzadroid/</link>
		<comments>http://blog.synformation.com/2010/01/13/forzadroid/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 19:50:01 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/?p=120</guid>
		<description><![CDATA[When Turn 10 offered Forza Motorsport 2, I bought an XBOX360 just to play this game. And I didn&#8217;t regret it. During more than two years I played approximately 3.000 games online, most of them in the public lobby system that Forza Motorsport had. I&#8217;m not a good racer, but I improved over time. I [...]]]></description>
			<content:encoded><![CDATA[<p>
When Turn 10 offered Forza Motorsport 2, I bought an XBOX360 just to play this game. And I didn&#8217;t regret it. During more than two years I played approximately 3.000 games online, most of them in the public lobby system that Forza Motorsport had. I&#8217;m not a good racer, but I improved over time. I primarily try to have fun while racing clean.
</p>
<p>
<img src="http://blog.synformation.com/wp-content/uploads/results-e1263601795310.png" alt="Screen from the Android application ForzaDroid" title="ForzaDroid calculation results" width="200" height="300" class="alignnone size-full wp-image-132" />
</p>
<p>
During the first month of Forza Motorsport 2 online gaming, one of my new online friends I met in the public lobbies tuned one of my cars for me. Wow, what a difference that was compared to the not tuned car. It handled much better and was faster, too. Armed with the knowledge that tuned cars can have better handling and can be faster, I tried tuning some of my other cars myself. Hmm, was much more difficult than I had thought. Most of it was trial and error, and I got tired fast.
</p>
<p><span id="more-120"></span></p>
<p>
But I really wanted my cars to be and behave better. So I turned to the theory necessary to understand what was needed to be successful with that. It was complicated, and although I understood the interaction of the various settings better, the quality of the results was only slightly better than before.
</p>
<p>
And then, I found FEUERDOGs suspension calculator for Forza Motorsport 2. The settings it produced were much better than those of my own efforts. And to be honest, I wanted to race. You have to like tuning in order to like it &#8211; haha! It&#8217;s not my thing. But by trying to tune cars in Forza Motorsport 2 myself, I got a glimpse of what it means to become a successful tuner.
</p>
<p>
Then came <a href="http://forzamotorsport.net" title="Forza Motorsport by Turn 10 | forzamotorsport.net">Forza Motorsport 3</a>, and I was eager to get it. I used the same tuning calculator for the new version of the game, and it still produced better tuning setups than I was able to come up with myself. FEUERDOG started working on a version for Forza Motorsport 3 and eventually he released it to the public.
</p>
<p>
I have no idea how many hours FEUERDOG spent to create the tuning calculators he did create. He might have spend more hours on it than I was spending on racing. Maybe he had as much fun doing the tuning calculator as I had during racing. But his work alone made it much more fun for me.
</p>
<p>
So today, I&#8217;m releasing ForzaDroid, the implementation of FEUERDOGs tuning calculator <a href="http://spreadsheets.google.com/ccc?key=0AtBDxiC-oePkdE1kSXlpV3pwa1BFWVJDLWVDWTNJR2c" title="FEUERDOGs tuning calculator as spreadsheet | google.com">FM3-December Update-4</a> as an Android application on the <a href="http://www.android.com/market" title="You cannot download ForzaDroid from here, you have to use your Android mobile phone | android.com">Android market</a> for free. There can be no other way, because I&#8217;m <a href="http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants" title="Standing on the Shoulder of Giants | wikipedia.org">standing on the shoulders of giants</a> here.
</p>
<p>
What does it offer? Well, here&#8217;s a list:
</p>
<ul>
<li>based entirely on FEUERDOGs <a href="http://spreadsheets.google.com/ccc?key=0AtBDxiC-oePkdE1kSXlpV3pwa1BFWVJDLWVDWTNJR2c" title="FEUERDOGs tuning calculator as spreadsheet | google.com">FM3-December Update-4</a> spreadsheet, you&#8217;ll get the same results</li>
<li>added &#8220;Transmission&#8221; selection for RWD differential settings (see FEUERDOGs remark in the spreadsheet for details)</li>
<li>available in English and German</li>
<li>it&#8217;s available at the Android Market and free (as in beer)</li>
<li>it&#8217;s simple and fast (hey, I&#8217;m not a designer, I&#8217;m a programmer)</li>
<li>no gear spreader &#8211; yet</li>
</ul>
<p>
To download ForzaDroid, visit the Android Market and search for it (search term <em>forzadroid</em>, but <em>forza</em> might work as well), or just scan the following QR Code with your Android powered mobile phone. It will take you directly to the Android Market:
</p>
<p>
<a href="http://blog.synformation.com/wp-content/uploads/forzadroid-qr.png"><img src="http://blog.synformation.com/wp-content/uploads/forzadroid-qr.png" alt="Android Market QR Code for ForzaDroid" title="Android Market QR Code for ForzaDroid" width="132" height="132" class="alignnone size-full wp-image-153" /></a>
</p>
<p>
If you have never tuned a car in Forza Motorsport 3 before, you can head over to <a href="http://forzatune.com" title="Forza Motorsport 3 suspension calculator for the iPhone | forzatune.com">ForzaTune</a> were you can find more information. They&#8217;re offering an iPhone application that does roughly the same thing – even more, it supports Forza Motorsport 2 – as ForzaDroid. It&#8217;s also based on FEUERDOGs work. But it has been around much longer.
</p>
<p>
If you like the Android application ForzaDroid, find a bug or have some suggestions, feel free to contact me. I won&#8217;t promise anything, but at least I&#8217;ll listen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2010/01/13/forzadroid/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>instantOLAP: The ROWNUM() function and grouping</title>
		<link>http://blog.synformation.com/2009/10/14/grouping-in-instantolap/</link>
		<comments>http://blog.synformation.com/2009/10/14/grouping-in-instantolap/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 21:35:17 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/?p=99</guid>
		<description><![CDATA[InstantOLAP is a lightweight reporting and OLAP system. It&#8217;s made for OLAP reports. But if we have a non-aggregating query, we can still list all the rows by using the ROWNUM() function, which helps iterating over the result set. But we&#8217;re not able to use a dimension for grouping the rows of the result set. [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://instantolap.com" title="instantolap.com | Lightweight and scalable Reporting- and OLAP-system">InstantOLAP</a> is a lightweight reporting and OLAP system. It&#8217;s made for OLAP reports. But if we have a non-aggregating query, we can still list all the rows by using the ROWNUM() function, which helps iterating over the result set. But we&#8217;re not able to use a dimension for grouping the rows of the result set.
</p>
<p>
I&#8217;ll give an example: imagine we have rows describing some customers. Each customer is in exactly one customer category. What we now want to have is a list of all these customers, but grouped by customer category. And because we have a dimension for the customer category, we want a separate table for each category. The naive solution seems to put the customer category dimension as an iteration into the outer block of the pivot table. But this will not work because ROWNUM() &#8211; an thereby the LINE_DIMENSION &#8211; is the only dimension used for iteration.
</p>
<p><span id="more-99"></span></p>
<p>
<img src="http://blog.synformation.com/wp-content/uploads/iolap_customertable.png" alt="Customer tables preview" title="How the tables should look like in the report" width="212" height="281" />
</p>
<p>
But there&#8217;s at least one way to achive that. It&#8217;s probably not the most elegant way and I&#8217;m eager to hear of other solutions, but it works for reports that are not too big.
</p>
<p>
We create a pivot table and in the outer block where we&#8217;ve put the table, we iterate over the customer category dimension. Set the iteration property to <code>{CUST_CAT::'CAT'}</code>. To see the current iteration in the title of the pivot table, put a text into the title property of the table, e.g. <code>"Customer category: " + {CUST_CAT::'CAT'}</code>.
</p>
<p>
Now, put the fact that holds the information about the customer category in the table. I&#8217;ve put <code>Fact:'CUSTOMER_CATEGORY'</code> as the first column. We don&#8217;t need to see it, so we can set it invisible. And here&#8217;s the trick: for the iteration over ROWNUM(), set the property Visible like this: <code>TONUMBER(CUST_CAT::'CAT') = TONUMBER(MATRIX(1))</code>, where the argument into the MATRIX() function is the position of your fact for the customer category.
</p>
<p>
<img src="http://blog.synformation.com/wp-content/uploads/iolap_tablelayout.png" alt="Layout of table in the report" title="Put a fact in the table that can be invisible" width="648" height="38" />
</p>
<p>
Because we have the dimension and level CUST_CAT::&#8217;CAT&#8217; as an iteration in the outer block, we basically create as many identical tables as the dimensions level has keys. If there&#8217;re 10 keys in the level, we have 10 tables with all the rows from our result set. But only those rows are visible where our fact matches the current key of the dimension, which basically allows us to group the customer rows by the dimension.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2009/10/14/grouping-in-instantolap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enough Talend for the job?</title>
		<link>http://blog.synformation.com/2008/05/26/post-enough-talend/</link>
		<comments>http://blog.synformation.com/2008/05/26/post-enough-talend/#comments</comments>
		<pubDate>Mon, 26 May 2008 21:55:49 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/?p=44</guid>
		<description><![CDATA[I&#8217;m part of a team that builds a data warehouse for our client, an international recognized car and motorcycle manufacturer. Right now, the data comes from various sources, most of it is provided in CSV files. As a first step, these files are loaded into a staging area. It has been decided to accomplish this [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m part of a team that builds a data warehouse for our client, an international recognized car and motorcycle manufacturer. Right now, the data comes from various sources, most of it is provided in CSV files. As a first step, these files are loaded into a staging area. It has been decided to accomplish this task with the help of an <a href="http://en.wikipedia.org/wiki/Extract,_transform,_load" title="Extract, Transform, and Load | wikipedia.org">ETL</a> tool. The tool that has been selected is <a href="http://www.talend.com/products-data-integration/talend-open-studio.php" title="Talend Open Studio tries to improve the data integration job process | talend.com">Talend Open Studio</a> (TOS).</p>
<p><span id="more-44"></span></p>
<h3>The tool</h3>
<p>Although I wasn&#8217;t involved in the selection process, there&#8217;re good reasons for TOS, some were decisive:</p>
<ul>
<li>it&#8217;s an Open Source solution</li>
<li>there&#8217;s a branch office in our country</li>
<li>based on the Java and Eclipse platform</li>
<li>active community</li>
<li>training and support offerings</li>
</ul>
<p>I&#8217;ve had really good experiences with our <a href="http://www.talend.com/press/talend-open-a-new-office-in-germany.php" title="New office in Germany | talend.com">main Talend contact</a> over here. Based on a couple of workshops and support cases I have to say that he was of great help for our project.</p>
<p>Depending on where you come from and what you need, some of the points speaking in favor of TOS for us might speak against it for you. The good thing is, there&#8217;re <a href="http://en.wikipedia.org/wiki/Category:ETL_tools" title="List of ETL tools | wikipedia.org">enough solutions/products</a> out there, maybe even one for you. But it might not be TOS. If you&#8217;re not sure if an ETL solution is right for you, maybe <a href="http://www.intelligententerprise.com/channels/information_management/showArticle.jhtml?articleID=207002081" title="Should You Use An ETL Tool | intelligententerprise.com">this article by J. Mundy</a> helps.</p>
<h3>The staging area</h3>
<p>The database system used for the staging area is <a href="http://www-306.ibm.com/software/data/db2/9/edition-express-c.html" title="DB2 Express-C is a full function DB2 data server at no charge | ibm.com">IBM DB2 Express-C</a>. The staging area is cleared before every import and has two stages itself:</p>
<ol>
<li>data is loaded into tables that reflect the schemas of the CSV files; all fields are VARCHAR fields</li>
<li>then, the data is converted into the proper types, e.g. DECIMAL(15,2), DATE, INTEGER, &#8230;</li>
</ol>
<p>The table schemas for the tables in stage one and stage two have a couple more fields than the CSV schemas:</p>
<ul>
<li>ID_ROW identifies the data row from the CSV file</li>
<li>STATUS holds information regarding the correctness of the data (and thus if it has been successfully written to the stage-two table)</li>
<li>ERRMSG contains a detailed description on the problem (if any)</li>
</ul>
<p>There&#8217;re many CSV files to import into the staging area, but the basic process is the same for all. The TOS job that does the work looks like this:</p>
<p><a href='http://blog.synformation.com/wp-content/uploads/talend.png'><img src="http://blog.synformation.com/wp-content/uploads/talend.png" alt="A Talend job as image" title="Talend job fills IBM DB2 staging area" class="alignnone size-medium wp-image-45" /></a></p>
<p>I&#8217;ll give you a short description of the process:</p>
<ul>
<li>first line imports the CSV data into the stage-one table
<ul>
<li>the CSV file is read in</li>
<li>because the CSV schema and the stage-one table schema differ (more fields, see above) we map the CSV schema to the table schema</li>
<li>each row gets the additional ID_ROW field filled</li>
<li>the data is written to the stage-one table</li>
</ul>
</li>
<li>the data now residing in the stage-one table is converted and written to the stage-two table
<ul>
<li>stage-one table data is read in</li>
<li>the conversion to the proper types takes place; the status and the error messages are generated here</li>
<li>all problem rows are sorted out, based on the content in STATUS</li>
<li>the rows without problems are written to the stage-two table</li>
</ul>
</li>
<li>error logging and reporting
<ul>
<li>all rows that didn&#8217;t make it to the stage-two table are updated in the stage-one table to have the correct STATUS and ERRMSG set</li>
<li>problematic rows are written to the console for this example</li>
</ul>
</li>
</ul>
<h3>TOS components</h3>
<p>TOS basically lets you work with components. You place them on the screen and connect them, enter some information into the properties of these components, and then TOS generates Java source code ready to compile and run. Once generated, you cannot alter the Java source code directly. You have to do it by altering the components properties. Some informations like schemas for CSV files and database tables, database connection info, etc. can be stored in a repository and you can connect them with components. That&#8217;s nice if you need the same information in more than one place.</p>
<p>For the type conversions, we use a component called tJavaRow. It has two main properties (called settings in TOS):</p>
<ul>
<li>the input and output schemas</li>
<li>a text area that contains the Java source code executed by this component</li>
</ul>
<p>I&#8217;ll explain later, why we use this really basic component instead of a more fancy one like tMap that seems to do the job more nicely. It doesn&#8217;t. Anyhow, the Java source code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">C_OUT.<span style="color: #006633;">STATUS</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;OK&quot;</span><span style="color: #339933;">;</span>
C_OUT.<span style="color: #006633;">ERRMSG</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
convert<span style="color: #009900;">&#40;</span>C_IN, C_OUT, <span style="color: #0000ff;">&quot;ID_ROW&quot;</span>, <span style="color: #0000ff;">&quot;toField&quot;</span>, <span style="color: #0000ff;">&quot;ID_ROW&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
convert<span style="color: #009900;">&#40;</span>C_IN, C_OUT, <span style="color: #0000ff;">&quot;FIELD_ONE&quot;</span>, <span style="color: #0000ff;">&quot;toNumber&quot;</span>, <span style="color: #0000ff;">&quot;SignedNumber&quot;</span>, <span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
convert<span style="color: #009900;">&#40;</span>C_IN, C_OUT, <span style="color: #0000ff;">&quot;FIELD_TWO&quot;</span>, <span style="color: #0000ff;">&quot;toNormString&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
convert<span style="color: #009900;">&#40;</span>...<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>A central conversion routine written in Java is used for all conversions. It does the exception handling in case of a problem (e.g. sets the fields STATUS and ERRMSG) and controls the conversion. The input and output Java data objects are passed in as well as the field names, the name of the conversion routine, and additional parameters. The convert method does the work by using the Java Reflection API to look up fields and methods. The advantage is that it simplifies the exception handling, but it comes with a price: there&#8217;s no type safety anymore, i.e. problems are reported at run time, not compile time. We automatically generate the calls from a repository that contains all necessary information. The Java source code is simply copied, not written by hand.</p>
<p>The tMap component on the other hand is nice for ad-hoc mapping and conversion of a few fields, but isn&#8217;t really fit for the task otherwise. It might look good during a presentation/sale pitch, but it&#8217;s just too painful to work with. That&#8217;s because you have to select every field where you want to enter some functionality. It&#8217;s just too many clicks. And guess what, if you have to refactor you code, you&#8217;ll start all over again, i.e. go to every output field and do the refactoring manually. Imagine a schema with couple of hundred fields and you go nuts.</p>
<h3>What I think so far</h3>
<p>I&#8217;ve only written about a small number of things regarding TOS, but they were important for this part of the project. The import of data from CSV files into the DB2 database is possible within the requirements given above. I didn&#8217;t have performance issues related to TOS. The visual components are nice, but sometimes get in the way of working efficiently. What I really want to see is the possibility to edit the components settings with a text editor as a whole in addition to the form based entry.</p>
<p>This information is based on TOS 2.3.2.r12707. Things that were broken in this release were</p>
<ul>
<li>HTML documentation was not generated at all</li>
<li>given exception locations weren&#8217;t in sync with generated source code</li>
<li>export project didn&#8217;t work without refreshing project in navigator view (F5)</li>
</ul>
<p>These things will be fixed in the next releases I&#8217;m sure.</p>
<p>Two last things I want to say:</p>
<ul>
<li>if you don&#8217;t have someone on the team who is sufficiently fluent in Java, you&#8217;ll have a hard time to implement non-trivial solutions; depends on your or my definition of &#8216;non-trivial&#8217; of course ;-)</li>
<li>after working with TOS for some time now, I have the feeling that it can solve nearly any problem that might occur in such a project</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2008/05/26/post-enough-talend/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wicket first contact</title>
		<link>http://blog.synformation.com/2008/01/06/post-wicket-first-contact/</link>
		<comments>http://blog.synformation.com/2008/01/06/post-wicket-first-contact/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 19:45:17 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2008/01/06/post-wicket-first-contact/</guid>
		<description><![CDATA[While working on an AJAX web application a couple of weeks ago, a co-worker asked me what I know about Wicket. Not much at that time. I knew it was some kind of component based web framework, but only in the sense like everybody knows that Porsche is a German car brand. During the recent [...]]]></description>
			<content:encoded><![CDATA[<p>While working on an AJAX web application a couple of weeks ago, a co-worker asked me what I know about <a href="http://wicket.apache.org" title="Apache Wicket home page | http://apache.org">Wicket</a>. Not much at that time. I knew it was some kind of component based web framework, but only in the sense like everybody knows that Porsche is a German car brand.</p>
<p>During the recent holidays I spent the entire time away from work and with my family. As most of the time when I&#8217;m away from work I made a list of things to look at. Wicket was not on that list. I seldom make it at least half way thru that list anyway. It was the same this time. But then I saw <a href="http://www.theserverside.com/news/thread.tss?thread_id=47979" title="Apache Wicket 1.3 released | http://theserverside.com">this article</a> on <a href="http://www.theserverside.com" title="TheServerSide.com is an online community for enterprise Java architects and developers | http://theserverside.com">TheServerSide</a> about the release of Wicket 1.3. The big amount of comments caught my interest. Suddenly, Wicket was on that list.</p>
<p><span id="more-42"></span></p>
<p>Today, I downloaded and installed Wicket, and then looked for documentation and tutorials. Besides some interesting online resources, I found the combination of two books on Wicket the most helpful:</p>
<ul>
<li>
The first ten available chapters of <a href="http://www.manning.com/dashorst" title="An authoritative, comprehensive guide for Java developers building Wicket-based web applications | http://manning.com">Wicket in Action (MEAP &#8211; Manning Early Access Program)</a> by Martijn Dashorst and Eelco Hillenius, published by Manning Publications Co.
</li>
<li>
<a href="http://www.agileskills2.org/EWDW" title="A book in tutorial style that walks you thru in a step-by-step manner | http://www.agileskills2.org/EWDW">Enjoying Web Development with Wicket</a> by Ka Iok Kent Tong, published as PDF only, with <a href="http://www.agileskills2.org/EWDW/chapters1-3.pdf" title="The first three chapters are freely available | http://agileskills2.org">freely available first three chapters</a>
</li>
</ul>
<p>The first book seems a little more verbose than the second book and covers more background, while the second book (besides being more complete right now) has much more source code examples. They complement each other perfectly in my opinion. So I got them both.</p>
<p>After reading thru the first three freely available chapters of &#8220;Enjoying Web Development with Wicket&#8221;, I got interested in chapter 6 (Supporting Other Languages). I was really impressed to see how I18N is a first class citizen in Wicket.</p>
<p><a href="http://blog.synformation.com:8080/wicket/cheesr" title='Screenshot from the Cheesr sample application'><img src="http://blog.synformation.com/wp-content/uploads/cheesr.png" alt="Screenshot from the Cheesr sample application" /></a></p>
<p>I then turned to &#8220;Wicket in Action&#8221;. Right now it is not completed and contains many errors, but none of this is really a problem. I made it thru the chapters 1-4 and implemented <a href="http://blog.synformation.com:8080/wicket/cheesr" title="Cheesr sample application | http://synformation.com">the Cheesr sample application</a> (from chapter 4) along the way.</p>
<p>I really like what I&#8217;ve seen so far from Wicket:</p>
<ul>
<li>It&#8217;s component based and encapsulates the request/response cycle</li>
<li>Components seem easy to write</li>
<li>Good internationalisation concept</li>
<li>Separation from logic and presentation</li>
</ul>
<p>Right, I&#8217;ve barely scratched the surface yet, but Wicket as a web framework looks promising.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2008/01/06/post-wicket-first-contact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I upgraded to GWT 1.4.61</title>
		<link>http://blog.synformation.com/2007/11/08/post-gwt-1461/</link>
		<comments>http://blog.synformation.com/2007/11/08/post-gwt-1461/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 20:05:01 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/11/08/post-gwt-1461/</guid>
		<description><![CDATA[The previous version GWT 1.4.60 came out on August 27th, 2007. A couple of days later I had upgraded all my applications, the expression calculator demo too. None of the applications suffered from a strange bug except the demo. It appeared only when Microsoft&#8217;s Internet Explorer was used. A message box was displayed that told [...]]]></description>
			<content:encoded><![CDATA[<p>The previous version GWT 1.4.60 came out on August 27th, 2007. A couple of days later I had upgraded all my applications, the <a href="http://blog.synformation.com/index.php/2007/02/10/post-gwt-application" title="GWT application">expression calculator demo</a> too. None of the applications suffered from a strange bug except the demo. It appeared only when Microsoft&#8217;s Internet Explorer was used. A message box was displayed that told the user: &#8220;operation aborted&#8221;. The page wasn&#8217;t shown at all, the user only saw a blank page. I had to remove the demo, at least from the home page. Since only the demo was affected, I didn&#8217;t go back to GWT 1.4.59.</p>
<p><span id="more-40"></span></p>
<p>Three days after GWT 1.4.60 came out, <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=1578" title="'operation aborted' error in Microsoft Internet Explorer | http://google.com">the issue</a> was reported, approximately at the same time I was experiencing it. I was hoping for a quick fix, but it didn&#8217;t come.</p>
<p>Several month later, Google&#8217;s Scott Blum wrote in the GWT forum about <a href="http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/bfb56b0f24bea849/4210aa5b7faca7d5#4210aa5b7faca7d5">an updated GWT 1.4 release</a>. Although I read the forum quite regularly, I nearly missed his posting. He talks about the new release fixing the problem, and he also provides a <a href="http://code.google.com/p/google-web-toolkit/downloads/list" title="Google Web Toolkit Downloads | http://google.com">download link for GWT 1.4.61</a>. I&#8217;ve downloaded it and upgraded all my application without a problem so far.</p>
<p><img src="http://blog.synformation.com/wp-content/uploads/gwt-1461.png" alt="Google Web Toolkit 1.4.61 is available for download" /></p>
<p>Since it fixes a very serious problem, you should upgrade also. Problem is, you will not see the new version on the <a href="http://code.google.com/webtoolkit/download.html" title="Google Web Toolkit Downloads | http://google.com">GWT download page</a>. At least not yet, but I bet you will see it there shortly. In the meantime, just use <a href="http://code.google.com/p/google-web-toolkit/downloads/list" title="Google Web Toolkit Downloads | http://google.com">this link</a>.</p>
<p><strong>Update:</strong> It took a little bit longer than I expected, but the GWT Team has just <a href="http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/6fef00f60eaa895c/2a1dc409ce60d9f3" title="GWT version 1.4.61 now officially released | http://google.com">officially released GWT 1.4.61</a>, which takes care of some minor bugs in the previous release of GWT 1.4.60. The two main issues that were addressed are the &#8220;operation aborted&#8221; startup error on IE and a potential XSS vulnerability in hosted mode.</p>
<p>There are no differences between the 1.4.61 version released on December 12th, 2007 and the 1.4.61 version released on November 3rd, 2007. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/11/08/post-gwt-1461/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trac for a team of one</title>
		<link>http://blog.synformation.com/2007/09/10/post-trac-for-one/</link>
		<comments>http://blog.synformation.com/2007/09/10/post-trac-for-one/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 21:50:13 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/09/10/post-trac-for-one/</guid>
		<description><![CDATA[Even the smallest development team (one developer) needs a source code repository with versioning like Subversion to track all the changes made to the source code over time, and to reproduce the revisions software releases were based on. The ability to create branches is necessary to maintain software releases in the field, while continuing with [...]]]></description>
			<content:encoded><![CDATA[<p>Even the smallest development team (one developer) needs a source code repository with versioning like Subversion to track all the changes made to the source code over time, and to reproduce the revisions software releases were based on. The ability to create branches is necessary to maintain software releases in the field, while continuing with development at the same time. If you think you don&#8217;t need it, you probably don&#8217;t know enough about it (in a couple of really rare cases, you might indeed not need it, but even then it really doesn&#8217;t hurt). For most developers, working with a source code repository is as natural as working with an IDE like <a href="http://www.eclipse.org" title="The Eclipse community is focused on building an open development platform">Eclipse</a>.</p>
<p><span id="more-39"></span></p>
<p>Even though small development teams use a version system in many cases, an issue tracking system is used to a lot lesser extend. But I believe that it&#8217;s quite as important as having something like Subversion, because it makes the developers life so much easier. I have just experienced it while working in a small team during my current project. And there are solutions out there, that are easy to install and maintain. One (and one of the easiest and best) is <a href="http://trac.edgewall.org" title="Trac is an enhanced wiki and issue tracking system">Trac</a>: Trac is an integrated software configuration (and project) management system (SCM). It&#8217;s an issue tracking system for software development projects with an integrated wiki. Basically, it&#8217;s a project management suite which includes a wiki, a bug/issue tracking system, and a source control viewer that accesses a <a href="http://subversion.tigris.org" title="Subversion is a version control system">Subversion</a> repository.</p>
<p><img src="http://blog.synformation.com/wp-content/uploads/tracxmlrpc.png" alt="Screenshot of Trac XML-RPC plugin working with Eclipse and Mylyn" /></p>
<p>Since developers always tend to try out the newest and latest (I&#8217;m no exception to this rule, nor do I want to disappoint you), I&#8217;ve installed the Trac version currently under development (0.11dev). The integration with the Eclipse development environment also requires the latest development version of the Trac XML-RPC plugin. This is what you should have installed already:</p>
<ul>
<li>Eclipse development platform with Mylyn Trac Connector.</li>
<li>Working Subversion (SVN) installation.</li>
<li><a href="http://www.python.org" title="Python is a dynamic object-oriented programming language">Python</a> is installed on your system (Trac is written in Python).</li>
<li><a href="http://peak.telecommunity.com/DevCenter/EasyInstall" title="Easy Install lets you automatically download, build, install, and manage Python packages">easy_install</a> is available.</li>
<li>It helps if you have installed an older version of Trac (e.g. 0.10.4) once. If you don&#8217;t have any experience with Trac, you should go <a href="http://trac.edgewall.org" title="Trac SCM">there</a> and read their documentation.</li>
</ul>
<p>Now install Trac and the Trac XML-RPC plugin:</p>
<ul>
<li>Checkout the latest development sources from Trac: <code>http://svn.edgewall.org/repos/trac/trunk</code>.</li>
<li>Install/update Trac from the <code>trunk</code> directory: <code>$ python setup.py install</code>.</li>
<li>Checkout the sources from the Trac XML-RPC plugin: <code>http://trac-hacks.org/svn/xmlrpcplugin</code>.</li>
<li>Install/update the Trac XML-RPC plugin as decribed <a href="http://trac-hacks.org/wiki/XmlRpcPlugin" title="The Trac XML-RPC Plugin">here</a>: <code>$ easy_install trunk</code>.</li>
<li>Edit <code>trac.ini</code> and add (under <code>[components]</code>) <code>tracrpc.* = enabled</code>.</li>
<li>Start (or restart) Trac, e.g. via <code>tracd</code>.</li>
</ul>
<p>You can now access and create your Trac tickets from within Eclipse with the help of the Mylyn Trac Connector.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/09/10/post-trac-for-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A small GWT application</title>
		<link>http://blog.synformation.com/2007/02/10/post-gwt-application/</link>
		<comments>http://blog.synformation.com/2007/02/10/post-gwt-application/#comments</comments>
		<pubDate>Sat, 10 Feb 2007 15:35:31 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/02/10/post-gwt-application/</guid>
		<description><![CDATA[I had some time today, so I built a little AJAX application for this blog. It&#8217;s an expression calculator. The world really doesn&#8217;t need another one, but it was the easiest thing that includes ANTLR for building a lexer/parser/AST and the Google Web Toolkit for building the client. Why? Because it&#8217;s fun &#8230; document.write("Loading..."); This [...]]]></description>
			<content:encoded><![CDATA[<p>I had some time today, so I built a little <a href="http://en.wikipedia.org/wiki/Ajax_(programming)" title="Wikipedia article on Asynchronous JavaScript and XML | http://wikipedia.org">AJAX</a> application for this blog. It&#8217;s an expression calculator. The world really doesn&#8217;t need another one, but it was the easiest thing that includes <a href="http://antlr.org" title="Homepage of ANother Tool for Language Recognition | http://antlr.org">ANTLR</a> for building a lexer/parser/AST and the <a href="http://code.google.com/webtoolkit" title="Google Web Toolkit - Build AJAX apps in the Java language | http://google.com">Google Web Toolkit</a> for building the client. Why? Because it&#8217;s fun &#8230;</p>
<p><span id="more-29"></span></p>
<div id="gwt-container">
<h2><script type="text/javascript">document.write("Loading...");</script></h2>
<h2><object><noscript>This is a rich browser application that requires JavaScript. Please activate JavaScript within your browser.</noscript></object></h2>
</div>
<div><script src="/gwt/modules/gwtcalc/gwtcalc.nocache.js" type="text/javascript"></script></div>
<p><em>If the application doesn&#8217;t load, please click <a href="http://blog.synformation.com/index.php/2007/02/10/post-gwt-application" title="Writing a small GWT application with ANTLR Studio and GWT Designer | http://synformation.com">here</a>!</em></p>
<p>Before I was able to include a GWT application within a post in this <a href="http://wordpress.org" title="WordPress is a state-of-the-art semantic personal publishing platform | http://wordpress.org">WordPress</a> powered blog, I had to <a href="http://blog.synformation.com/index.php/2007/02/10/post-gwt-plugin" title="Creating a WordPress Plugin to generate gwt:module meta tags | http://synformation.com">create a WordPress plugin</a> that generates the necessary meta tags. GWT applications only work, when those meta tags are present.</p>
<p>The actual calculation of the expression is done on the server with the help of <a href="http://blog.synformation.com/index.php/page-synformation" title="What is synformation? | http://synformation.com">my Java based framework</a>. The expression is sent to the server asynchronously as a <a href="http://json.org" title="JavaScript Object Notation | http://json.org">JSON</a> data packet. The server logic evaluates the expression and sends back either the result, or an error message. If you want to see an error message, try a division by 0. The response is sent also in the JSON format back to the browser, where the GWT application takes it and displays it without refreshing the whole page.</p>
<p>The server side logic is built with the help of <a href="http://antlr.org" title="Homepage of ANother Tool for Language Recognition | http://antlr.org">ANTLR</a> and <a href="http://www.placidsystems.com/antlrstudio.aspx" title="ANTLR Studio for Eclipse | http://placidsystems.com">ANTLR Studio for Eclipse</a>. Instead of writing a lexer and parser for evaluation of the expressions myself, I&#8217;ve used a grammar to let these tools do it for me. The following screenshot shows <a href="http://www.placidsystems.com/antlrstudio.aspx" title="ANTLR Studio for Eclipse | http://placidsystems.com">ANTLR Studio for Eclipse</a> in action:</p>
<p><img src="http://blog.synformation.com/wp-content/uploads/antlrstudio.png" alt="Eclipse screenshot with ANTLR Studio" /></p>
<p>If you want to know what ANTLR is, here is a quote from Terence Parr, the primary author of ANTLR. He has been working on translation tools since the late 80s:</p>
<blockquote><p>ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a parser and translator generator tool, akin to the venerable lex/yacc duo, that lets you construct recognizers, compilers, and source-to-source translators from grammatical descriptions containing C++ or Java actions. You can build translators for database formats, graphical data files (e.g., PostScript, AutoCAD), text processing files (e.g., HTML, SGML), etc. ANTLR is designed to handle all of your translation tasks. ANTLR is recommended by the co-inventor of LL(k) parsers and by the inventor of SLR(k) and LALR(k) parser.</p></blockquote>
<p>Another tool makes generation of GWT clients easier. It&#8217;s the <a href="http://www.instantiations.com/gwtdesigner/index.html" title="GWT Designer is a GUI creator that supports Google's Web Toolkit | http://instantiations.com">GWT Designer</a> from Instantiations. I&#8217;m having a few problems with it, but it still helps a lot. See the following screenshot for an impression:</p>
<p><img src="http://blog.synformation.com/wp-content/uploads/gwtdesigner.png" alt="Eclipse screenshot with GWT Designer" /></p>
<p>If you&#8217;re interested in this example built with GWT, ANTLR, JSON, etc., and you want to look at the source code, just download it from <a href="http://blog.synformation.com/wp-content/uploads/gwtcalc.zip" title="Download Eclipse GWTCalc project with source code | http://synformation.com">here</a>.</p>
<p>Do you remember the little problem from the <a href="http://blog.synformation.com/index.php/2007/02/10/post-kids-geometry" title="Solving a problem geometrically | http://synformation.com">Geometry for kids</a> post earlier today? With the calculator, you can verify if the solution is correct: <code>d = sqrt(3)*5.3</code>.</p>
<p><strong>Update 1:</strong> As of GWT 1.4, a new application-loading mechanism has been introduced, that doesn&#8217;t require a meta tag in the page header. It&#8217;s still supported for legacy applications. But now, the applications HTML code can directly reference the JavaScript file. I&#8217;ve changed the example above accordingly.</p>
<p><strong>Update 2:</strong> The calculator has been updated to GWT 2.0. The project available for <a href="http://blog.synformation.com/wp-content/uploads/gwtcalc.zip" title="Download Eclipse GWTCalc project with source code | http://synformation.com">download</a> has been updated as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/02/10/post-gwt-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a WordPress Plugin</title>
		<link>http://blog.synformation.com/2007/02/10/post-gwt-plugin/</link>
		<comments>http://blog.synformation.com/2007/02/10/post-gwt-plugin/#comments</comments>
		<pubDate>Sat, 10 Feb 2007 12:40:20 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/02/10/post-gwt-plugin/</guid>
		<description><![CDATA[It wasn&#8217;t planned that way, but it turned out that I had to write a WordPress plugin myself to solve a problem. I want to have a Google Web Toolkit application run inside my blog. No big deal, but I couldn&#8217;t accomplish one tiny detail. GWT applications need a meta tag with the name gwt:module [...]]]></description>
			<content:encoded><![CDATA[<p>It wasn&#8217;t planned that way, but it turned out that I had to write a WordPress plugin myself to solve a problem. I want to have a <a href="http://code.google.com/webtoolkit" title="Google Web Toolkit - Build AJAX apps in the Java language">Google Web Toolkit</a> application run inside my blog. No big deal, but I couldn&#8217;t accomplish one tiny detail. GWT applications need a meta tag with the name <code>gwt:module</code> in the page header section. How do I manage to get this meta tag up there whenever a post includes a GWT application?</p>
<p><span id="more-30"></span></p>
<p>First, I looked for help where all the <a href="http://codex.wordpress.org/Plugins/Meta" title="WordPress plugins for meta tags">WordPress plugins/meta</a> are listed. None of them seems to solve my problem. To be honest, I only looked at a few, so I really don&#8217;t know if I&#8217;ve overlooked the one I need. One <a href="http://wordpress.uberdose.com/wordpress/another-wordpress-meta-plugin.html" title="WordPress plugin for inserting description and keywords as meta tags">Meta plugin</a> came quite close to what I want, but it was for <code>description</code> and <code>keywords</code> only. Except that, it would have been perfect. So I took its idea and modified it.</p>
<p>You have to use <a href="http://codex.wordpress.org/Using_Custom_Fields" title="Using custom fields">WordPress&#8217; custom fields</a> for storing the <code>gwt:module</code> meta tags. Just create a new custom field when you create or edit a post. The <code>key</code> should be set to <code>gwt:module</code>, and the <code>value</code> should be the path and name of your GWT module. The plugin then collects all <code>gwt:module</code> meta tags for all posts on the page and puts them in the header section of the page.</p>
<p><img src="http://blog.synformation.com/wp-content/uploads/gwt-custom-field.png" alt="Creating a custom field for a GWT-module" /></p>
<p>In case you want to use this plugin yourself, you can download the <a href="http://blog.synformation.com/wp-content/uploads/gwt_plugin.zip" title="WordPress plugin for creating gwt:module meta tags">WordPress plugin for creating gwt:module meta tags</a> from this web site.</p>
<p>Later today, I will write <a href="http://blog.synformation.com/index.php/2007/02/10/post-gwt-application" title="GWT application">a post</a> that actually has a GWT application included.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/02/10/post-gwt-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Programming editors</title>
		<link>http://blog.synformation.com/2007/02/01/post-epsilon-editor/</link>
		<comments>http://blog.synformation.com/2007/02/01/post-epsilon-editor/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 21:20:22 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/02/01/post-epsilon-editor/</guid>
		<description><![CDATA[Everybody who is programming is using one or more of them. My favorite programming editor is Epsilon from Lugaru Software Ltd., and that since 1996. It&#8217;s around since 1984. Although my first version was for DOS, Windows, and OS/2, I used it primarily under DOS for writing C programs. I started in 1978 with a [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody who is programming is using one or more of them. My favorite programming editor is Epsilon from <a href="http://lugaru.com" title="Homepage of Lugaru Software Ltd. | http://lugaru.com">Lugaru Software Ltd.</a>, and that since 1996. It&#8217;s around since 1984. Although my first version was for DOS, Windows, and OS/2, I used it primarily under DOS for writing C programs. I started in 1978 with a BASIC dialect and 8080/Z80 assembler on a SORD M200 computer. I wasn&#8217;t thinking about what editor to use back then, because there was no choice. I had to use the one that came with this SORD computer. A little later I switched to C and then C++, followed by Java in 1996. There will be something after Java, but I can&#8217;t see it yet. It&#8217;s not so much the programming language itself that keeps me, but the Java platform.</p>
<p><span id="more-26"></span></p>
<p><img src="http://blog.synformation.com/wp-content/uploads/epsilon.png" alt="Screenshot from Epsilon editor under Windows" /></p>
<p>Epsilon is an <a href="http://www.gnu.org/software/emacs/" title="Home of GNU Emacs| http://gnu.org">Emacs</a> clone, but unlike Emacs, which can be extended with Lisp code, Epsilon uses a C-like language called EEL (Epsilon extension language). As you can see from the list of programming languages I&#8217;m sufficient familiar with, Lisp isn&#8217;t on it, but C is. Although this short enumeration of programming languages isn&#8217;t complete, I haven&#8217;t used any of the others for a substantial amount of time. It&#8217;s important for me, that Epsilon is programmable in a language I&#8217;m fluent in.</p>
<p>There&#8217;s one exception to my otherwise consistent use of Epsilon. When it comes to Java programming, I&#8217;m using Eclipse most of the time. Not always, because some things I still do with Epsilon, but most of the things are a little easier within Eclipse.</p>
<p>During the time I worked with Epsilon, I observed a strange thing: some programmers (even brilliant ones) worked with editors that are not supporting them well with their work. Even when shown alternative editors that would support them much more, they gave up early on learning the features of the new tool. Instead, they spend hours writing some small utility programs for tasks that are possible within minutes for editors like Epsilon. Instead of investing the time in learning a new tool, they spend much more time with fixing the shortcomings of the editors they were used to.</p>
<p>Don&#8217;t get me wrong, Epsilon is not a panacea for everything, and I&#8217;m gone the minute I find something better. But in the past 10 years, I haven&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/02/01/post-epsilon-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If something goes wrong</title>
		<link>http://blog.synformation.com/2007/01/26/post-goes-wrong/</link>
		<comments>http://blog.synformation.com/2007/01/26/post-goes-wrong/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 19:15:05 +0000</pubDate>
		<dc:creator>Thomas Weitzel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Synformation]]></category>

		<guid isPermaLink="false">http://blog.synformation.com/index.php/2007/01/26/post-goes-wrong/</guid>
		<description><![CDATA[When you build a software system, something can go wrong. You have to plan for that. It can be a programming error, an operator error, or a situation you haven&#8217;t planned for. I&#8217;m pretty sure you have seen web pages giving you cryptic error messages, thus indicating that something went wrong. In many cases, the [...]]]></description>
			<content:encoded><![CDATA[<p> When you build a software system, something can go wrong. You have to plan for that. It can be a programming error, an operator error, or a situation you haven&#8217;t planned for. I&#8217;m pretty sure you have seen web pages giving you cryptic error messages, thus indicating that something went wrong. In many cases, the given error message is useful for a programmer, but seldom for the average web user.</p>
<pre>
Fatal error:
Call to undefined function: some_function() in
/srv/domain.com/httpdocs/content/mytheme/header.php
on line 42</pre>
<p>As a web user, what does this error message tell you? Maybe you can understand it. But can you do something about it? You can&#8217;t fix it, you&#8217;re left alone on finding your way out, it&#8217;s not helping you. Why then show it to you at all? The reason is, it wasn&#8217;t intended for you to see it. This error message is only useful for the developer. But he hasn&#8217;t planned for exactly this type of situation. Okay, it&#8217;s a programming error. But that you have to see this error in a form like this is lack of planning for this type of situation. Everybody knows or can understand that it&#8217;s not a good idea to have a web user look at a web page indicating an error like the one I showed you. But it&#8217;s still what happens in many cases. Why? Is it laziness on behalf of the developers, lack of good test cases, lack of imagination, lack of time or budget, or not enough knowledge? I think it&#8217;s a little of everything. The book <a href="http://www.amazon.com/o/ASIN/073571410X" title="How to improve error messages, help, forms, and other crisis points | http://amazon.com">Defensive Design for the Web</a> from <a href="http://37signals.com" title="Our products do less than the competition - intentionally | http://37signals.com">37signals</a> might tell you nothing a web developer should know already, but it contains a nice check list at the end to make sure he doesn&#8217;t forget to apply his knowledge.</p>
<p><span id="more-23"></span></p>
<p>To assist the developer in handling all not handled situations, synformation provides the mechanism of an error page that is called via <code>forward()</code> whenever a not handled error occurs. This error page is a normal synformation page with one exception: within the logic of the error page, you have access to an error object that holds all the information about the error. If you don&#8217;t define an error page within synformation, you&#8217;ll get something like the cryptic error shown above. It&#8217;s worse actually, because it might contain a Java stack trace because synformation runs on the Java platform.</p>
<p>I can only think of one reason to display a technical error message within the web page: the page is produced for the developer or tester. In all other cases, the user should see something more friendly, something that gives him some information on what to do next. He should not leave our web site in frustration. That&#8217;s why a typical synformation error page should contain logic like this:</p>
<pre>
&lt;%%
$variable = getVariable("error");
if (null != $variable) {
    $msg = $error.toString();
    print S("X-ERROR-ERRORPAGE");
    // There's no need to send an email when an ACU can see the error
    if (isDevelopment() || getCurrentUser().isMemberOf("ACU")) {
%&gt;
&lt;div id="infobox" class="infobox-info"&gt;
&lt;h1&gt;&lt;%%= R("ERROR-PAGE-HEADING") %&gt;&lt;/h1&gt;
&lt;p&gt;&lt;%%= $msg %&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;%%
    } else {
        print S("X-INFO-WHAT-NEXT");
        sendMail(R("ADDRESS"), R("SUBJECT"), R("TEXT") + $msg);
    }
} else {
    print S("PAGE-NOT-CALLABLE");
}
%&gt;</pre>
<p>I will explain this code snippet. First, we have to find out if an error object actually exists. If it does, the users gets a friendly hint in his language that an unexpected error has occurred and we&#8217;re really sorry about that. If we are in development mode, or the user has logged in and he is a developer, the actual error message is displayed, too. If we have a normal web user, a text with options on what to do next is presented. An email is then sent off to the development team with all the technical information needed to reproduce and fix the error. In case no error object exists, this page was called without having an error. Maybe somebody typed in the URL in his browser. We tell him in friendly language, that this page is not intended to be used like that. We can also display some information on what to do next &#8211; he is already on our page, so why not keep him.</p>
<p>We all know that things can go wrong. But we should all care more for having an actual plan installed, if that happens. I&#8217;m not perfect in this regard either, so this post might help me as a reminder.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.synformation.com/2007/01/26/post-goes-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
