<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1" -->
<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/"
	>

<channel>
	<title>AnyWare</title>
	<link>http://www.anyware.co.uk/2005</link>
	<description>Development &#038; consultancy services</description>
	<pubDate>Fri, 20 Jun 2008 12:56:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>
	<language>en</language>
			<item>
		<title>Skype - not drifting, but sinking the ship!</title>
		<link>http://www.anyware.co.uk/2005/2008/06/20/skype-not-drifting-but-sinking-the-ship/</link>
		<comments>http://www.anyware.co.uk/2005/2008/06/20/skype-not-drifting-but-sinking-the-ship/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 12:50:04 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[World]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/2008/06/20/skype-not-drifting-but-sinking-the-ship/</guid>
		<description><![CDATA[After my post the other day wondering what on earth Skype is going to do next, having been seemingly inactive for so long, I had a look around their site and found Skype 4.0 beta for windows including a video showing their new totally reworked UI.
Check out the blog post and the many many negative [...]]]></description>
			<content:encoded><![CDATA[<p>After my post the other day wondering what on earth Skype is going to do next, having been seemingly inactive for so long, I had a look around their site and found <a href="http://share.skype.com/sites/en/2008/06/skype_40_beta_1_for_windows.html">Skype 4.0 beta for windows</a> including a video showing their new totally reworked UI.</p>
<p><a href="http://share.skype.com/sites/en/2008/06/skype_40_beta_1_for_windows.html">Check out the blog post </a>and the many many negative user comments!</p>
<p>In a nutshell, the UI on Windows is changing to a full screen UI, with overcomplicated horrendous Windows design touches. It truly beggars belief that they can be so wrong about this and misjudge their user base so.</p>
<p>One comment on the blog that sums it up well is:</p>
<p>&quot;An app like Skype should be really out of the way most of the time. For me it is a great communication tool, but I have to switch if this is Skype&#8217;s future.&quot;</p>
<p>It seems like Skype&#8217;s ego has taken over and forgotten that it is just&nbsp; a phone on steroids. If your mobile phone suddently became the size of your laptop, you&#8217;d get rid of it for a better one. Skype will haemorrhage users if they don&#8217;t rethink this UI disaster.</p>
<p>I can only think that most of the developers/producers with a clue have left Skype and new people post Ebay takeover are completely ruining the company.</p>
<p>Who knows, our entire company might &#8230;. shudder&#8230; have to switch to iChat. At least it has multi-way video and app sharing. It doesn&#8217;t have SkypeIn or SkypeOut though of course, but we currently don&#8217;t use those and will not start if Skype&#8217;s UI goes this awful awful way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/06/20/skype-not-drifting-but-sinking-the-ship/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Grails JSON Builder that doesn&#8217;t suck</title>
		<link>http://www.anyware.co.uk/2005/2008/06/19/a-grails-json-builder-that-doesnt-suck/</link>
		<comments>http://www.anyware.co.uk/2005/2008/06/19/a-grails-json-builder-that-doesnt-suck/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 19:21:55 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
		
		<category><![CDATA[Groovy and Grails]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/2008/06/19/a-grails-json-builder-that-doesnt-suck/</guid>
		<description><![CDATA[Now we&#8217;ve been doing some fun Ajax bits with JSON recently in Grails. However it has been very painful using the JSON builder. Initially I didn&#8217;t want to use the JSON converter (render x as JSON) as the data is coming from several sources, and there are some domain class properties we don&#8217;t want to [...]]]></description>
			<content:encoded><![CDATA[<p>Now we&#8217;ve been doing some fun Ajax bits with JSON recently in Grails. However it has been very painful using the JSON builder. Initially I didn&#8217;t want to use the JSON converter (render x as JSON) as the data is coming from several sources, and there are some domain class properties we don&#8217;t want to expose.</p>
<p>So the builder approach seemed to make sense. The only trouble is that <strong>render(contentType:&#8217;text/json&#8217;) { &#8230; } </strong>uses Grails default JSONBuilder which I have discovered sucks, and also blows.</p>
<p>The default JSONBuilder uses method calls for everything. However in some cases the method name is ignored - eg elements of an array. Also you can only set name/value pairs with simple method(value) constructs on the root node of the builder, as in subnodes each one of these creates a new object eg { method: value }. The final blow for me was that property values of anything other than simple types are just rendered as strings. For example a property value that is an array of ints is rendered as a string so &quot;[1, 2, 3, 4]&quot; because <a href="http://jira.codehaus.org/browse/GRAILS-3147">JSONWriter has just a def value(Object) method that calls toString()</a>. This is in contrast to the &quot;as JSON&quot; converter construct which works nicely with nested objects and is sane when it comes to recursion/parent node references.</p>
<p>So as soon as you step away from trivial lists and have any kind of object graph to represent, it falls down.</p>
<p>Enough was enough so I knocked this together. It needs a lot more sanity checking in there and possibly some optimisation but it took half an hour and it works. Using it is a case of calling &quot;render new BetterJSONBuilder() { &#8230; }&quot;.</p>
<p>What it does is use any method calls with a Map to create a new JSON object with those properties. Any method call with a closure creates a new array OR object - if the first call in a closure is to &quot;element(value)&quot; it will create an array. Property access is permitted on object nodes eg you set properties with x=y not with x(y) as in the standard horrible JSONBuilder.</p>
<p>Internally it just creates a tree of maps/lists and then uses &quot;as JSON&quot; to do the conversion. Short and sweet.</p>
<div class="ch_code_container" style="font-family: monospace;height:200px;"><p><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> BetterJSONBuilder <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> NODE_ELEMENT = <span style="color: #ff0000;">&quot;element&quot;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> root<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> current<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> nestingStack = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> build<span style="color: #66cc66;">&#40;</span>Closure c<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; c.<span style="color: #006600;">delegate</span> = <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//c.resolveStrategy = Closure.DELEGATE_FIRST</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; root = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current = root<br />
&nbsp; &nbsp; &nbsp; &nbsp; c.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span style="color: #993399; font-weight: bold;">call</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> root <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20as"><span style="color: #000000; font-weight: bold;">as</span></a> JSON <span style="color: #808080; font-style: italic;">// requires deep</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20invokeMethod"><span style="color: #993399;">invokeMethod</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> methodName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>methodName<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20invokeMethod"><span style="color: #993399;">invokeMethod</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> methodName, <a href="http://www.google.de/search?as_q=Object&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>args.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> <a href="http://www.google.de/search?as_q=Map&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Map</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// switch root to an array if elements used at top level</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>current == root<span style="color: #66cc66;">&#41;</span> &amp;&amp; <span style="color: #66cc66;">&#40;</span>methodName == NODE_ELEMENT<span style="color: #66cc66;">&#41;</span> &amp;&amp; !<span style="color: #66cc66;">&#40;</span>root <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> <a href="http://www.google.de/search?as_q=List&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">List</span></a><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>root.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;Cannot have array elements in root node if properties of root have already been set&#8217;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current = root<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> n = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> <a href="http://www.google.de/search?as_q=List&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">List</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>methodName != NODE_ELEMENT<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;Array elements must be defined with the &quot;element&quot; method call eg: element(value)&#8217;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> n<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>methodName<span style="color: #66cc66;">&#93;</span> = n<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n.<span style="color: #006600;">putAll</span><span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> Closure<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> n = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nestingStack <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> current</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> <a href="http://www.google.de/search?as_q=List&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">List</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> n<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>methodName<span style="color: #66cc66;">&#93;</span> = n<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current = n<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span>.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span style="color: #993399; font-weight: bold;">call</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current = nestingStack.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20pop"><span style="color: #663399;">pop</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>ars.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>methodName != NODE_ELEMENT<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;Array elements must be defined with the &quot;element&quot; method call eg: element(value)&#8217;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// switch root to an array if elements used at top level</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>current == root<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>root.<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;Cannot have array elements in root node if properties of root have already been set&#8217;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current = root<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span>current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20instanceof"><span style="color: #000000; font-weight: bold;">instanceof</span></a> <a href="http://www.google.de/search?as_q=List&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">List</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;Array elements can only be defined under &quot;array&quot; nodes&#8217;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20throw"><span style="color: #000000; font-weight: bold;">throw</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a href="http://www.google.de/search?as_q=IllegalArgumentException&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">IllegalArgumentException</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;This builder does not support invocation of [$methodName] with arg list ${args.dump()}&quot;</span><span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>methodName<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p>&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> setProperty<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> propName, <a href="http://www.google.de/search?as_q=Object&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>propName<span style="color: #66cc66;">&#93;</span> = value<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getProperty<span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=String&#038;num=100&#038;hl=en&#038;as_occt=url&#038;as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> propName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current<span style="color: #66cc66;">&#91;</span>propName<span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
<p><strong><em>Update:</em> </strong>I found this morning that I missed out the &quot;import grails.converters.JSON&quot; from this. I also discovered that for me at least, if I imported the deep.JSON converter, I was getting lots of &quot;Value out of sequence&quot; exceptions. Using the normal non-deep JSON converter all is fine and, weirdly, nested objects seem fine too - e.g. I have a top level JS object, a value within it that is an array of other objects, and those objects have an array property also. All rendering fine without deep JSON converter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/06/19/a-grails-json-builder-that-doesnt-suck/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Skype - drifting?</title>
		<link>http://www.anyware.co.uk/2005/2008/06/16/skype-drifting/</link>
		<comments>http://www.anyware.co.uk/2005/2008/06/16/skype-drifting/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 15:47:51 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/2008/06/16/skype-drifting/</guid>
		<description><![CDATA[It seems to be very, very quiet on the Skype development front. Nothing significant has come out of them for Mac for ages since they added video calls.
Skype is starting to look like the poor relation of other applications like iChat that can support video conferening with multiple participants. You would have thought this is [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be very, very quiet on the Skype development front. Nothing significant has come out of them for Mac for ages since they added video calls.</p>
<p>Skype is starting to look like the poor relation of other applications like iChat that can support video conferening with multiple participants. You would have thought this is a natural feature for Skype to add - so either it is presenting major technical problems to them, or they are not interested in it because it will not necessarily generate any new VOIP revenue for them.</p>
<p>If iChat was available on PC and the UI wasn&#8217;t such a confusing pile of surprisingly uncool crap for an Apple app, we and all my work colleagues would be switching over to it pronto. Not to mention the app sharing features of iChat. We need a solid &quot;whiteboard&quot; solution that lets us show the documents we are looking at locally to other participants in the video chat, to facilitate &quot;round table&quot; meetings when we&#8217;re not together.</p>
<p>Skype guys - what is going on? Your software seems to be stagnating. Have EBay drained you of all innovation? Are you chasing the VOIP cash without your eye on the wider picture of user loyalty?</p>
<p>These are not particularly advanced requirements, and it seems strange that Skype is behind the market here, having been an innovator for a long time.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/06/16/skype-drifting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We need you - vacant job positions</title>
		<link>http://www.anyware.co.uk/2005/2008/06/16/we-need-you-vacant-job-positions/</link>
		<comments>http://www.anyware.co.uk/2005/2008/06/16/we-need-you-vacant-job-positions/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 13:54:15 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
		
		<category><![CDATA[Groovy and Grails]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/2008/06/16/we-need-you-vacant-job-positions/</guid>
		<description><![CDATA[Due to continued expansion, Enotions with whom I work extensively have several positions that need filling almost immediately.

Account manager - web savvy, very personable and professional you will be required to make frequent client meetings with several leading UK brands, to keep them informed about site progress, liaise on new developments and communicate client needs [...]]]></description>
			<content:encoded><![CDATA[<p>Due to continued expansion, <a href="http://www.enotions.co.uk">Enotions</a> with whom I work extensively have several positions that need filling almost immediately.</p>
<ul>
<li>Account manager - web savvy, very personable and professional you will be required to make frequent client meetings with several leading UK brands, to keep them informed about site progress, liaise on new developments and communicate client needs to our project managers.</li>
<li>QA / Tester - AKA Quality Nazi. We need someone who takes offence at not finding a bug in the site that we later find ourselves - or worse the client finds. Every site HAS to validate.&nbsp; Every site HAS to be link checked. Every client requirement HAS to be met. We don&#8217;t want ANY typos on live sites. Detailed issue tracking and moving towards automated testing should be things that get you excited. Our development teams are eager for you to kick their asses.</li>
<li>PHP and Javascript developer - we have an opening for a professional PHP and JS coder who will drive progress and quality in our small/mid-range customer sites introducing reliable and proven PHP database libraries and utilizing JS and Ajax, working with our HTML/CSS builders to produce polished sites</li>
</ul>
<p>If you fancy working from home, using skype as a lifeline, and want to help take this thriving business to the next level, please get in touch with Rob Richardson (workwithus@enotions.co.uk)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/06/16/we-need-you-vacant-job-positions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The smallest things bring great joy</title>
		<link>http://www.anyware.co.uk/2005/2008/06/09/the-smallest-things-bring-great-joy/</link>
		<comments>http://www.anyware.co.uk/2005/2008/06/09/the-smallest-things-bring-great-joy/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 16:51:35 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
		
		<category><![CDATA[Groovy and Grails]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/2008/06/09/the-smallest-things-bring-great-joy/</guid>
		<description><![CDATA[I just discovered to my joy that the recently released Grails 1.0.3 has a small but WONDERFUL feature added.
Line numbers are now shown in source code when you append ?showSource to your URL in development mode. This is extremely handy for debugging GSPs.
Thank you Graeme, or whoever implemented it.
&#160;
&#160;
&#160;
]]></description>
			<content:encoded><![CDATA[<p>I just discovered to my joy that the recently released Grails 1.0.3 has a small but WONDERFUL feature added.</p>
<p>Line numbers are now shown in source code when you append ?showSource to your URL in development mode. This is extremely handy for debugging GSPs.</p>
<p>Thank you Graeme, or whoever implemented it.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/06/09/the-smallest-things-bring-great-joy/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
