<?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>Rob@Rojotek &#187; Java</title>
	<atom:link href="http://www.rojotek.com/blog/blog/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rojotek.com/blog</link>
	<description>Software Development in Brisbane</description>
	<lastBuildDate>Sat, 17 Jul 2010 01:40:20 +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>Executing Play! from outside of Play! code</title>
		<link>http://www.rojotek.com/blog/2010/04/26/executing-play-from-outside-of-play-code/</link>
		<comments>http://www.rojotek.com/blog/2010/04/26/executing-play-from-outside-of-play-code/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 09:30:25 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Play! Framework]]></category>
		<category><![CDATA[play]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=949</guid>
		<description><![CDATA[As I&#8217;ve said earlier, I think that the Play! framework is lovely.  It makes it easy to develop and write code quickly.  One of the ways that it enables this is through performing runtime byte code enhancement of the code.  This makes execution of your code somewhat non-trivial when coming from a [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve said <a href="http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/">earlier</a>, I think that the Play! framework is lovely.  It makes it easy to develop and write code quickly.  One of the ways that it enables this is through performing runtime byte code enhancement of the code.  This makes execution of your code somewhat non-trivial when coming from a non-Play! context.  Play! aims to meet all your needs, but use cases exist where it is important non-Play! code with Play! code, and have your non-Play! code call into Play! </p>
<p>Having said that this is non-trivial, it is reassuring to know that the process to do this is very straight forward. </p>
<ol>
<li>Create a subclass of play.Invoker.Invocation.</li>
<li>Override the public void execute() method.</li>
<li>Call the run() method of the invocation.</li>
</ol>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; Invoker.<span style="color: #006633;">Invocation</span> invocation <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Invoker.<span style="color: #006633;">Invocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//do stuff with play here</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; invocation.<span style="color: #006633;">run</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>With this simple snippet of code, it is possible to have non-Play! code easily and cleanly call your Play! application code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2010/04/26/executing-play-from-outside-of-play-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Eleven reasons to use the Play! Framework for Java Web Development</title>
		<link>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/</link>
		<comments>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 23:55:10 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Play! Framework]]></category>
		<category><![CDATA[play]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=929</guid>
		<description><![CDATA[The Play! Framework is a great tool for rapidly building Java web applications. Play! takes many of the ideas from the dynamic languages world (Rails and Django), and provides them to Java web development.  Reasons to conside Play! for Java Development are:

Rapid development via a local development server that automatically compiles your java code for you. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.playframework.org/">Play!</a> Framework is a great tool for rapidly building Java web applications. Play! takes many of the ideas from the dynamic languages world (Rails and Django), and provides them to Java web development.  Reasons to conside Play! for Java Development are:</p>
<ol>
<li>Rapid development via a local development server that automatically compiles your java code for you.  It&#8217;s amazing how good it is to develop like this, and what a difference the rapid feedback loop makes.</li>
<li>A good clean MVC famework.</li>
<li>Nice testing support baked in.</li>
<li>A useful routing table to make clean urls easy to work with.</li>
<li>A focus around REST, but no slavish observence of it.</li>
<li>built-in simple JSON support.</li>
<li>A good module framework with useful <a href="http://www.playframework.org/modules">modules</a> including a &#8220;CRUD&#8221; module, and a <a href="http://www.playframework.org/documentation/1.1-trunk/scala">Scala module</a> currently under development</li>
<li>An interesting mix of Java class enhancement that makes it easy to work with code, and then have the enhancer provide some of the hard work for ensuring that multiple threads are handled well.</li>
<li>Deployment to a range of platforms, including <a href="http://java.sun.com/products/servlet/">JEE Servlets</a> (Play! 1.0.2 has been tested on containers such as tomcat, jetty, JBoss and IBM WebSphere Portal 6.1), and the <a href="http://code.google.com/appengine/docs/java/">GAE</a>.</li>
<li>Enhancements to the <a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/">JPA</a> which make it really easy to work with.</li>
<li>An active and supportive community.  There is the right balance between having strong opinions about the &#8220;Play!&#8221; way of doing things, and helping people to get things done.</li>
</ol>
<p>Play! makes Java web development fun and productive.  The feedback loop is really quick, and much of the boilerplate code is removed. It&#8217;s well worth considering for any application you want to write in Java.</p>
<p>Take a look at <a href="http://www.playframework.org/">the video</a>, and work through <a href="http://www.playframework.org/documentation/">the tutorial</a> to get a feel for what development with Play! is like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2010/04/10/eleven-reasons-to-use-the-play-framework-for-java-web-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Making the Home and End Keys work in Eclipse 3.4 on Apple Mac OSX</title>
		<link>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/</link>
		<comments>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 01:22:29 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X Tools, Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=897</guid>
		<description><![CDATA[       Hidden in the comments of the article of Starry Hope &#8211; Mac Home and End Keys are some instructions for how to make the home and end keys work well as begin and end line in eclipse. &#160;I&#39;ve done all the other tricks to make this work on [...]]]></description>
			<content:encoded><![CDATA[<p>       Hidden in the comments of the article of <a href="http://www.starryhope.com/tech/2006/mac-os-x-home-and-end-keys/#comment-294 ">Starry Hope &#8211; Mac Home and End Keys</a> are some instructions for how to make the home and end keys work well as begin and end line in eclipse. &#160;I&#39;ve done all the other tricks to make this work on my Mac, so was getting really frustrated with Eclipse. &#160;double home and double end are common key combinations for me in IntelliJ and Eclipse on Windows, so the current behaviour of going to the beginning or end of the file drives me crazy. &#160;The details of doing this differ slightly in Eclipse 3.4.1, so I&#39;ll list the steps I followed below.    </p>
<ol>
<li>        open the eclipse preferences pane      </li>
<li>        general-&#62;keys      </li>
<li>        in the filter type line start and note that there will be existing bindings when editing text.      </li>
<li>        select line start type home, and ensure that the &quot;when&quot; field stays with Editing Text      </li>
<li>        apply      </li>
<li>        follow this process for select line start, line end, and select line end.      </li>
</ol>
<p>       After doing this, expect your anger at eclipse on Mac to decrease to much more manageable levels.    </p>
<p>       &#160;    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A Review of 5 Java JSON Libraries</title>
		<link>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/</link>
		<comments>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/#comments</comments>
		<pubDate>Thu, 07 May 2009 04:19:44 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/?p=860</guid>
		<description><![CDATA[       &#160;    
       json.org lists 18 different Java libraries for working with JSON (Flexjson gets a double mention). These provide varying levels of functionality, from the simplest (the default org.json packages), to more comprehensive solutions like XStream and Jackson. Join [...]]]></description>
			<content:encoded><![CDATA[<p>       &#160;    </p>
<p http-equiv="Content-Type" name="generator" content="EditLive! 6.3.4.80">       <a href="http://www.json.org/">json.org</a> lists 18 different Java libraries for working with <span class="caps">JSON</span> (Flexjson gets a double mention). These provide varying levels of functionality, from the simplest (the default org.json packages), to more comprehensive solutions like XStream and Jackson. Join me on a quick review of some of these, focusing on those which have friendly licenses, and meet my requirements. &#160;If you are lazy, you can fast forward to my <a href="#Summary2">summary</a>    </p>
<p>       My Requirements    </p>
<ol>
<li>        Serialises and Deserialises <span class="caps">JSON</span>      </li>
<li>        Lightweight and Simple      </li>
<li>        runs on Java 1.4      </li>
<li>        Friendly license      </li>
</ol>
<p>       The contendors    </p>
<ol>
<li>        org.json      </li>
<li>        Jackson      </li>
<li>        XStream      </li>
<li>        JsonMarshaller      </li>
<li>        <span class="caps">JSON</span>.simple      </li>
</ol>
<h2>       Serialises and Deserialises <span class="caps">JSON</span>    </h2>
<p>       This might sound like an obvious requirement, but I’ve seen at least one library which was completely focused on spitting out <span class="caps">JSON</span>, without any support for reading <span class="caps">JSON</span>. I’m actually using this as a pre-requisite for inclusion in my comparison. If a library can’t read <span class="caps">AND</span> write <span class="caps">JSON</span>, I’m not going to consider it.    </p>
<h2>       Lightweight    </h2>
<p>       I’ll begin by stating that my actual usecase is to operate within a plugin for EditLive!. I don’t need a all singing all dancing <span class="caps">JSON</span> serialisation/deserialisation library. There are some very cool libraries out there that do awesome stuff, but all I need to do is read and write <span class="caps">JSON</span> data.    </p>
<p>       Coupled with this is that I’ll want to be able to keep the memory footprint pretty low, so want to work with Java Streams without needing to necessarily pull in the whole serialised object if I don’t need it.    </p>
<h2>       Runs on Java 1.4    </h2>
<p>       Yep it’s still out there. Thankfully <a hrer="http://java.sun.com/j2se/1.4.2/download.html">Java 1.4.2</a> has reached it’s <span class="caps">EOL</span>, but businesses can still request patches, and there are most definitely still Ephox clients running on this <span class="caps">JRE</span>, even though more recent <span class="caps">JRE</span>’s work so much better. (side note: If you have the option of upgrading your <span class="caps">JRE</span> to Java 6, please do it, the children in Africa will be much happier. Everytime someone runs up a 1.4 <span class="caps">JRE</span> a puppy dies). 1.4 is in it’s final death throws, but it is still kicking.    </p>
<h2>       Friendly License    </h2>
<p>       For Ephox to make money from the product/component that uses <span class="caps">JSON</span> (gotta think about the $$$ at the end of the day), I’ll need to make sure that the license is non-viral and Enterprise friendly. Apache license good. <span class="caps">GPL</span> bad. (sorry <span class="caps">FSF</span>)    </p>
<h2>       Assessment&#160;    </h2>
<p>       So having run through the requirements, we can now consider the options. For each library, I’ll provide a simple table.    </p>
<p>       The metrics I’m using to judge the libraries are included in the table. The most crude metric that I’ve got is the number of classes. I’m more than happy to admit that this is a very crude way to measure how lightweight the library is, but it does provide an ok rough heuristic, particularly given that there are order of magnitude differences.    </p>
<h2>       org.json    </h2>
<p>       The granddady of them all. This comes pretty close to being a reference implementation. It provides a nice simple <span class="caps">API</span> (7 classes), doesn’t try and do any magic, and just makes sense. I’ve used it before when working with small amounts of data. Unfortunately it doesn’t provide any streaming goodness.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://www.JSON.org/java/index.html">http://www.JSON.org/java/index.html</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          7        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          No        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       Jackson    </h2>
<p>       Jackson advertises itself as a fast powerful conformant <span class="caps">JSON</span> processor. It provides heaps of features, and looks to be a good tool for reading and writing <span class="caps">JSON</span> in a variety of ways (see the <a href="http://jackson.codehaus.org/Tutorial">Jackson tutorial</a> for more). The drawback of Jackson for my purposes is that it isn’t exactly svette at 250 classes.    </p>
<table>
<tr>
<th>          url        </th>
<td>          <a href="http://jackson.codehaus.org/">http://jackson.codehaus.org/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          ~250        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       XStream    </h2>
<p>       XStream gets a mention because it’s cool <img src='http://www.rojotek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I haven’t really considered it because it provides more of a direct object serialisation format, which wasn&#39;t quite what I&#39;m looking for. Also, it’s heritage as an xml serialisation format shows, and it likes Java 5 much better. The ability to directly go between Javabeans and <span class="caps">JSON</span> java classes is cool, but I don&#39;t need this magic or the 200+ classes that come with it.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://xstream.codehaus.org/">http://xstream.codehaus.org/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          &#62;200        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       Json Marshaller    </h2>
<p>       Json Marshaller sells itself (it almost sounds like a bolierplate project description by now) as “Fast, Lightweight, Easy to Use and Type Safe <span class="caps">JSON</span> marshalling library for Java”. It’s been under consistent active development for a number of years, and looks to be headed in the right direction. Unfortunately the current version has 3 deal stopping flaws for my environment at the moment.    </p>
<ol>
<li>        It requires Java 5      </li>
<li>        It has a dependancy on <span class="caps">ASM</span> (the developers are looking to remove his dependancy)      </li>
<li>        While it hasn’t quite piled on the bulk of XStream or Jackson, it still has a couple to many classes for me to consider      </li>
</ol>
<p>       These constraints make it not quite fit for my purposes, but like all decisions, it depends on your own situation.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://code.google.com/p/jsonmarshaller/">http://code.google.com/p/jsonmarshaller/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          ~50        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          No        </td>
</tr>
</table>
<h2>       <span class="caps">JSON</span>.simple    </h2>
<p>       <span class="caps">JSON</span>.simple advertises itself as “a simple Java toolkit for <span class="caps">JSON</span>”. It provides reading and writing to <span class="caps">JSON</span> streams. It’s lightweight and focused on generating <span class="caps">JSON</span> from Java code. The critical feature it provides is support for Java IO readers and writers.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          url        </th>
<td>          <a href="http://code.google.com/p/json-simple/">http://code.google.com/p/json-simple/</a>         </td>
</tr>
<tr>
<th>          classes        </th>
<td>          12        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
</tr>
<tr>
<th>          Java 1.4        </th>
<td>          Yes        </td>
</tr>
</table>
<h2>       <a id="Summary2" name="Summary2">Summary&#160;</a>    </h2>
<p>       For the interested, here’s a table that summarises my findings.    </p>
<table class="PrimaryBordersTable">
<tr>
<th>          &#160;        </th>
<th>          <a href="http://www.JSON.org/java/index.html">org.json</a>         </th>
<th>          <a href="http://jackson.codehaus.org/">Jackson</a>         </th>
<th>          <a href="http://xstream.codehaus.org/">XStream</a>         </th>
<th>          <a href="http://code.google.com/p/jsonmarshaller/">Json Marshaller</a>         </th>
<th>          <a href="http://code.google.com/p/json-simple/">JSON.Simple</a>         </th>
</tr>
<tr>
<th>          classes        </th>
<td>          7        </td>
<td>          ~250        </td>
<td>          &#62;200        </td>
<td>          ~50        </td>
<td>          12        </td>
</tr>
<tr>
<th>          Streaming support        </th>
<td>          No        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
</tr>
<tr>
<th>          Friendly License        </th>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
<td>          Yes        </td>
</tr>
<tr>
<th height="25">          Java 1.4        </th>
<td height="25">          Yes        </td>
<td height="25">          Yes        </td>
<td>          Yes        </td>
<td height="25">          No        </td>
<td height="25">          Yes        </td>
</tr>
</table>
<p>       &#160;    </p>
<h2>       Conclusion    </h2>
<p>       If you are looking for a simple lightweight Java library that reads and writes <span class="caps">JSON</span>, and supports Streams, <span class="caps">JSON</span>.simple is probably a good match. It does what it says on the box in 12 classes, and works on legacy (1.4) JREs.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Choosing a data storage format</title>
		<link>http://www.rojotek.com/blog/2009/05/06/choosing-a-data-storage-format/</link>
		<comments>http://www.rojotek.com/blog/2009/05/06/choosing-a-data-storage-format/#comments</comments>
		<pubDate>Wed, 06 May 2009 02:46:56 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[YAML]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2009/05/06/choosing-a-data-storage-format/</guid>
		<description><![CDATA[       In case you haven’t noticed, XML is not a silver bullet. (google xml+silver+bullet). It is not, and should not be an automatic choice when thinking of a data storage format. The ubiquitous libraries for working with XML are often hard to use, and are often overkill for a [...]]]></description>
			<content:encoded><![CDATA[<p>       In case you haven’t noticed, <span class="caps">XML</span> is not a silver bullet. (<a href="http://www.google.com/search?q=xml+silver+bullet">google xml+silver+bullet</a>). It is not, and should not be an automatic choice when thinking of a data storage format. The ubiquitous libraries for working with <span class="caps">XML</span> are often hard to use, and are often overkill for a simple storage format. In today’s world, I’d suggest that the following options should be considered (at least briefly).    </p>
<ol>
<li>        Native Object Serialisation      </li>
<li>        Custom format      </li>
<li>        <span class="caps">XML</span> – Extensible Markup Language      </li>
<li>        <span class="caps">YAML</span> – <span class="caps">YAML</span> Ain’t a Markup Language (obviously created by geeks with the recursive name)      </li>
<li>        <span class="caps">JSON</span> – JavaScript Object Notation      </li>
</ol>
<p>       Join me in having a look at these formats, and I’ll let you know some of the issues to consider. The main problem I’m solving is for data that belongs to your own application. I’m not considering databases or interoperability.    </p>
<h2>       Native Object Serialisation    </h2>
<p>       Consider this briefly before running away. I’m particularly familiar with the idea of Java Object serialisation. I’ve used <a href="http://www.prevayler.org/">Prevayler</a> in the past storing java objects, and xml (So while I’m having a dig at Java Object serialisation in general, I’m not specifically having a go at prevayler).    </p>
<p>       While the use of native object serialisation is often easy, it has costs, making the content unreadable by humans, coupling the data storage to your implementation language, and can create object migration issues. These costs will typically outweigh the benefits. Having human readable data to aid debugging would provide reason for not using native object serialisation if there was nothing else.    </p>
<h2>       Custom Format    </h2>
<p>       The use of a custom simple text format should not be discarded out of hand. The lack of any third party dependancies is a useful feature, and should be considered. That said, if you have a library that does the parsing for you, that should not be sneezed at.    </p>
<h2>       <span class="caps">XML</span>    </h2>
<p>       As wikipedia says, “XML is a general-purpose specification for creating custom mark-up languages” (<a href="http://en.wikipedia.org/wiki/XML">Wikipedia on <span class="caps">XML</span></a>). Parsers and tools exist for many platforms and environments, which makes it a useful tool when you want to share information between different environments. While a good tool, the syntax is verbose, and can be hard for humans to read.    </p>
<p>       <span class="caps">XML</span> has influenced the birth of two of two more recent notations which are useful for data storage: <a href="http://yaml.org/spec/current.html"><span class="caps">YAML</span></a>, and <a href="http://www.json.org/xml.html"><span class="caps">JSON</span></a>    </p>
<h2>       <span class="caps">YAML</span>    </h2>
<p>       <span class="caps">YAML</span> purports to be “a human friendly data serialization standard for all programming languages” (<a href="http://yaml.org/">Yaml.org</a>). It has a well defined specification (<a href="http://yaml.org/spec/current.html"><span class="caps">YAML</span> Spec</a>), and makes for an easy to understand data storage format. Implementations of <span class="caps">YAML</span> exist for a wide range of languages, including Java, C++, Ruby and Javascript. It’s been around for a while, and has a decent amount of uptake. If it wasn’t for <span class="caps">JSON</span>, it would probably be a good default choice.    </p>
<h2>       <span class="caps">JSON</span>    </h2>
<p>       At first glance <span class="caps">JSON</span> seems much less suitable than <span class="caps">YAML</span> for languages other than JavaScript. The kicker against it is that it has “JavaScript” in the name, which has always made people feel icky. That said, it does make for a good cross platform format, it is human readable, and is implemented on a wide range of platforms (<a href="http://www.json.org/">Json.org</a>).    </p>
<p>       <span class="caps">JSON</span> has also has the advantages of having mindshare, and is slightly more familiar to developers than <span class="caps">YAML</span>. Every developer who has had anything to do with the web has done stuff with JavaScript, so the basic format will be familiar to them. Also in <span class="caps">JSON</span>’s favour is the fact that <span class="caps">JSON</span> and <span class="caps">YAML</span> are syntactically very close (<a herf="http://redhanded.hobix.com/inspect/yamlIsJson.html">see Redhanded</a>). <span class="caps">JSON</span> appears to be very close to a subset of <span class="caps">YAML</span>(<a href="http://ajaxian.com/archives/json-yaml-its-getting-closer-to-truth">Ajaxian</a>). In addition, the general applicability of <span class="caps">JSON</span> is higher, particularly for people who are going to be doing Javascript development. Also, if you have any possibility of playing with JavaScript, <span class="caps">JSON</span> is a very good option because of the native support in JavaScript.    </p>
<p>       These factors combine to make <span class="caps">JSON</span> an excellent choice.    </p>
<h2>       Summary    </h2>
<p>       Tim Bray makes a good case for this being an automatic choice based on your circumstances(<a href="http://www.tbray.org/ongoing/When/200x/2006/12/21/JSON">http://www.tbray.org/ongoing/When/200x/2006/12/21/JSON</a> ). You’ll still need to think about the pros and cons of the different technologies for your situation (see <a href="http://webignition.net/articles/xml-vs-yaml-vs-json-a-study-to-find-answers/">http://webignition.net/articles/xml-vs-yaml-vs-json-a-study-to-find-answers/</a>), but you’ll often find that <span class="caps">JSON</span> is a good format to use for data storage.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2009/05/06/choosing-a-data-storage-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing&#8221;No backend servers available&#8221; running Vignette on Weblogic</title>
		<link>http://www.rojotek.com/blog/2008/11/26/fixingno-backend-servers-available-running-vignette-on-weblogic/</link>
		<comments>http://www.rojotek.com/blog/2008/11/26/fixingno-backend-servers-available-running-vignette-on-weblogic/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 20:50:22 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Vignette]]></category>
		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2008/11/26/fixingno-backend-servers-available-running-vignette-on-weblogic/</guid>
		<description><![CDATA[After spending a considerable amount of time looking at WebLogic and Vignette groups and sides on the net, I finally worked out the cause of a recent &#8220;No backend servers available&#8221; error message which was occuring when trying to access the vcm 7.5 AppConsole on a recently installed version of Vignette.&#160; In the end google [...]]]></description>
			<content:encoded><![CDATA[<p>After spending a considerable amount of time looking at WebLogic and Vignette groups and sides on the net, I finally worked out the cause of a recent &#8220;No backend servers available&#8221; error message which was occuring when trying to access the vcm 7.5 AppConsole on a recently installed version of Vignette.&nbsp; In the end google didn&#8217;t know the answer to my question.&nbsp; It&#8217;s time to teach google a lesson.</p>
<p>So after getting quite frustrated with what was happening, being unable to find documentation, and finding that a reinstall wasn&#8217;t helping much, I pulled out a developers true friend, and started poking around with the runtime services console.</p>
<p>After playing around with the runtime services, I was able to work out that the default install of Vignette&nbsp; was setting up a cluster, containing the single server.&nbsp; The combination of suspending and restarting my vmware virtual machine was leading to the Weblogic server to not be started correctly, resulting in the &#8220;No backend servers available&#8221; error when trying to visit the AppConsole.&nbsp; </p>
<p>This problem was resolved by following two simple steps:
<ul>
<li>being patient after a restart, allowing the system to do all its checks, (waiting about 5 minutes worked for me) and then</li>
<p>
<li>simply starting the server using the runtime services console. clusters-&gt;[cluster name]-&gt; control -&gt; start/stop -&gt; startup.</li>
<p></ul>
<p>So if you end up in a situation where you are seeing &#8220;No backend servers available&#8221; with Vignette and WebLogic, don&#8217;t despair, it can be resolved by simply starting the servers in your cluster (even if it&#8217;s a cluster of 1) after patiently waiting (about 5 minutes) for the server to get into a stable state.</p>
<p>Thankfully google knows this too now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2008/11/26/fixingno-backend-servers-available-running-vignette-on-weblogic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reducing the Startup time for IBM WebSphere Portal</title>
		<link>http://www.rojotek.com/blog/2008/09/10/reducing-the-startup-time-for-ibm-websphere-portal/</link>
		<comments>http://www.rojotek.com/blog/2008/09/10/reducing-the-startup-time-for-ibm-websphere-portal/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:41:47 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[WebSphere Portal]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2008/09/10/reducing-the-startup-time-for-ibm-websphere-portal/</guid>
		<description><![CDATA[
       After spending too much time today waiting for WebSphere Portal to restart (due to a nasty bug causing Portal to crash when I was working with it) I&#39;ve been revisiting how to improve the startup time.
    

       The key [...]]]></description>
			<content:encoded><![CDATA[<p>
       After spending too much time today waiting for WebSphere Portal to restart (due to a nasty bug causing Portal to crash when I was working with it) I&#39;ve been revisiting how to improve the startup time.
    </p>
<p>
       The key step in doing this is to uninstall portlets that aren&#39;t needed. (see <a href="http://www-01.ibm.com/support/docview.wss?rs=899&#38;uid=swg21213982&#38;ca=lsall">http://www-01.ibm.com/support/docview.wss?rs=899&#38;uid=swg21213982&#38;ca=lsall</a> for a list). For the lazy developers (read me) there are a series of scripts that have been developed that do this. The article <a href="http://www.ibm.com/developerworks/rational/library/07/0327_riordan/index.html">Installing and configuring WebSphere Portal V6.0 Servers for development with Rational Application Developer V7.0 and Rational Software Architect V7.0</a> includes these scripts in a zip file (search for StartupPerformanceConfig.zip in the article). The article also has some good suggestions for memory and jvm settings for your server.
    </p>
<p>
       I have known about the existence of this process for a little while, but it took me a little to find them just now (when tuning a development server). Google was have troubles pointing me to the right article, so I thought for my sake I&#39;d try and help google find this in the future. (Even if google did find the right spots, the title of the developerworks article wouldn&#39;t have made me think that it had the nugget of information about IBM WebSphere Portal Startup performance).
    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2008/09/10/reducing-the-startup-time-for-ibm-websphere-portal/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SSH Tunnelling is your Friend</title>
		<link>http://www.rojotek.com/blog/2008/09/09/ssh-tunnelling-is-your-friend/</link>
		<comments>http://www.rojotek.com/blog/2008/09/09/ssh-tunnelling-is-your-friend/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 03:13:50 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2008/09/09/ssh-tunnelling-is-your-friend/</guid>
		<description><![CDATA[
       I&#39;ve been using ssh tunnels for a while now. I first encountered the technique when setting up my e-mail client when doing research at the ISI. The ISI are understandably quite security conscious, so a ssh tunnel was required to access my mail on my mac. I&#39;ll admit [...]]]></description>
			<content:encoded><![CDATA[<p>
       I&#39;ve been using ssh tunnels for a while now. I first encountered the technique when setting up my e-mail client when doing research at the <a href="http://www.isi.qut.edu.au/">ISI</a>. The ISI are understandably quite security conscious, so a ssh tunnel was required to access my mail on my mac. I&#39;ll admit that I set this up initially withot really having a clue, simply following the directions of the guys at the ISI that knew what they were doing. I had a couple of ssh commands sitting in an e-mail (and more often than not in my history), which I would simply refer to and reuse.
    </p>
<p>
       More recently at <a href="http://www.ephox.com/">Ephox</a> I&#39;ve been doing a fair bit of ssh tunneling. I&#39;ve been doing this to access the UK demo server for E2, exposing the Websphere admin and wcm portal urls via the tunnels. This process has worked relatively well for a couple of weeks for me, but in my current stage I&#39;m going through some pain as the transfer of my ear file from the local build to the remote server is taking between 15 and 20 minutes currently. To get around this for some rapid bug fixing work, I&#39;ve entered the next stage of my ssh tunneling jujitsu
    </p>
<ul>
<li>
        ssh to remote server
      </li>
<li>
        ssh back to local Brisbane office, setting up a tunnel into subversion server
      </li>
<li>
        then use subversion to check out the codebase.
      </li>
</ul>
<p>
       After having performed this setup work, I can easily do my changes on my local box, update the remote server via svn, then build and deploy from the remote server. The build and deploy are currently too manual, and could use some automation, but I&#39;m currently happy to wear the pain, and drop my deploy process from 20 minutes to under five. &#160;
    </p>
<p>
       My current next step is to automate the rest of the process. &#160;Assuming my recent foray into sysadmin land didn&#39;t completely kill the server, this should be done very soon.
    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2008/09/09/ssh-tunnelling-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ Analyze Stack Trace</title>
		<link>http://www.rojotek.com/blog/2008/09/04/intellij-analyze-stack-trace/</link>
		<comments>http://www.rojotek.com/blog/2008/09/04/intellij-analyze-stack-trace/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 22:38:00 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2008/09/04/intellij-analyze-stack-trace/</guid>
		<description><![CDATA[       The IntelliJ Analyse stack trace is a good tool to add to your bag of tricks.
       Simple copy a stack trace to the clipboard, then go to IntelliJ -&#62; Analyze Menu -&#62; Analyze Stack trace
       You [...]]]></description>
			<content:encoded><![CDATA[<p>       The IntelliJ Analyse stack trace is a good tool to add to your bag of tricks.</p>
<p>       Simple copy a stack trace to the clipboard, then go to <strong>IntelliJ -&#62; Analyze Menu -&#62; Analyze Stack trace</strong></p>
<p>       You will see the option to normalize the stacktrace (which is worth choosing), after pressing ok, you will see the output put into the run menu, which will allow you to navigate to classes inside your current project.</p>
<p>       This is a nice tool for debugging support stacktraces you may receive, or stack traces originating from a remote server.
    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2008/09/04/intellij-analyze-stack-trace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelliJ Cheat Sheet</title>
		<link>http://www.rojotek.com/blog/2008/09/02/intellij-cheat-sheet/</link>
		<comments>http://www.rojotek.com/blog/2008/09/02/intellij-cheat-sheet/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 01:22:00 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.rojotek.com/blog/2008/09/02/intellij-cheat-sheet/</guid>
		<description><![CDATA[As I seem to end up with the odd person dropping by the blog to look at IntelliJ keyboard Short cuts, I figured that it is probably worth pointing people towards the DZone IntelliJ Refcard which has a pretty good introduction to IntelliJ.
]]></description>
			<content:encoded><![CDATA[<p>As I seem to end up with the odd person dropping by the blog to look at <a href="http://www.rojotek.com/blog/2007/10/24/todays-cool-keyboard-shortcut-in-intellij/">IntelliJ keyboard Short cuts</a>, I figured that it is probably worth pointing people towards the <a href="http://refcardz.dzone.com/announcements/intellij-idea">DZone IntelliJ Refcard</a> which has a pretty good introduction to IntelliJ.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rojotek.com/blog/2008/09/02/intellij-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
