<?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>iHenk</title>
	<atom:link href="http://www.ihenk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ihenk.com</link>
	<description>Chaos leads to order</description>
	<lastBuildDate>Sun, 27 Feb 2011 17:36:35 +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>Dyncon 2011</title>
		<link>http://www.ihenk.com/2011/02/27/dyncon-2011/</link>
		<comments>http://www.ihenk.com/2011/02/27/dyncon-2011/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 17:36:35 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2011/02/27/dyncon-2011/">admin</span></dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=182</guid>
		<description><![CDATA[In about two weeks I&#8217;m going to Dyncon 2011, a conference for dynamic languages and frameworks. There will be talks about Erlang, Node.js, Clojure, Python and ofcourse Groovy &#038; Grails. I&#8217;m proud to be one of the speakers and  I&#8217;m going to talk about Groovy &#038; Grails. During my talk, I will build a [...]]]></description>
			<content:encoded><![CDATA[<p>In about two weeks I&#8217;m going to <a href="http://swdc-central.com/dyncon2011/">Dyncon 2011</a>, a conference for dynamic languages and frameworks. There will be talks about Erlang, Node.js, Clojure, Python and ofcourse Groovy &#038; Grails. I&#8217;m proud to be one of the speakers and  I&#8217;m going to talk about Groovy &#038; Grails. During my talk, I will build a Google TV like web application. This I will show how powerfull Groovy &#038; Grails is!!<a href="http://www.ihenk.com/wp-content/uploads/2011/02/GTV-logo-text.png"><img src="http://www.ihenk.com/wp-content/uploads/2011/02/GTV-logo-text-295x300.png" alt="" title="GTV-logo-text" width="295" height="300" class="aligncenter size-medium wp-image-183" /></a></p>
<p>So if you have a change to come to Stockholm, join us at Dyncon! It will be a very exciting and interesting weekend. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2011/02/27/dyncon-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Game Jam Workshop</title>
		<link>http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/</link>
		<comments>http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 08:45:00 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/">admin</span></dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=162</guid>
		<description><![CDATA[ Back in the 80&#8217;s I started programming on the Commodore VIC-20. Playing games, but also programming.

But in 2010, how can you make high schoolers enthousiastic about programming? What&#8217;s a nice programming environment for high school students? Maybe just a browser and simple text editor? Yes, with HTML5 you can create nice small programs, for [...]]]></description>
			<content:encoded><![CDATA[<p> Back in the 80&#8217;s I started programming on the Commodore VIC-20. Playing games, but also programming.<br />
<a href="http://www.ihenk.com/wp-content/uploads/2010/12/vic20.jpg"><img src="http://www.ihenk.com/wp-content/uploads/2010/12/vic20-150x150.jpg" alt="" title="vic20" width="150" height="150" class="aligncenter size-thumbnail wp-image-164" /></a></p>
<p>But in 2010, how can you make high schoolers enthousiastic about programming? What&#8217;s a nice programming environment for high school students? Maybe just a browser and simple text editor? Yes, with HTML5 you can create nice small programs, for example games.</p>
<p>With this in mind I created a <a href="http://html5gamejamworkshop.appspot.com">HTML5 Game Jam Workshop</a>, a workshop for highschool students to learn the basics of HTML.</p>
<p>And last week I had my first try out, a high school in Zutphen, the Netherlands. Everything went very well and the children were very enthousiastic! Some of them had already experience with HTML and javascript. But there were also a few without any experience, but at the end of the afternoon they hacked a small game!!</p>
<div class="picasaView clearfix">
	<a href="http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/?picasaViewAlbumId=HTML5GameJamWorkshop%2C0" title=""><img src="http://lh3.ggpht.com/-MzfJLk3G8kU/TQkEKDg-0JE/AAAAAAAAWP0/kcVDEqoI2Os/s160-c/HTML5GameJamWorkshop.jpg" alt="HTML5 Game Jam Workshop" title="" /></a>
	<h3><a href="http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/?picasaViewAlbumId=HTML5GameJamWorkshop%2C0">HTML5 Game Jam Workshop</a></h3>
	<p> <small>(15.12.2010, 10 Photos)</small></p>
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/12/19/html5-game-jam-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Voice Search</title>
		<link>http://www.ihenk.com/2010/11/04/google-voice-search/</link>
		<comments>http://www.ihenk.com/2010/11/04/google-voice-search/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 21:03:36 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/11/04/google-voice-search/">admin</span></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=160</guid>
		<description><![CDATA[Back in june Profict &#038; Google Technology User Group organized a Google Hackathon. During this event we volunteered to help Google with Google Voice Search. We had to talk aloud 500 words..sometimes though and sometimes we  had strange words &#8230; but in the end it was fun!!
And today Google announced Google Voice Search for [...]]]></description>
			<content:encoded><![CDATA[<p>Back in june Profict &#038; Google Technology User Group organized a Google Hackathon. During this event we volunteered to help Google with Google Voice Search. We had to talk aloud 500 words..sometimes though and sometimes we  had strange words &#8230; but in the end it was fun!!</p>
<p>And today Google announced Google Voice Search for the Netherlands. So thanks to us also people from Drenthe, Overijssel and Twente can use Google Voice! <img src='http://www.ihenk.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>For more information : <a href="http://www.nu.nl/internet/2371297/google-maakt-gesproken-zoekopdrachten-mogelijk.html">Google Voice</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/11/04/google-voice-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps API : Welcome to version 3</title>
		<link>http://www.ihenk.com/2010/07/14/google-maps-api-welcome-to-version-3/</link>
		<comments>http://www.ihenk.com/2010/07/14/google-maps-api-welcome-to-version-3/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 06:00:13 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/07/14/google-maps-api-welcome-to-version-3/">admin</span></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=133</guid>
		<description><![CDATA[About a month ago Google introduced version 3 of Google Maps Javascript API (V3), a replacement of version 2. A lot of changes under the hood and this version is especially optimized for mobile devices such as Android and the iPhone. Also an interesting note : you don&#8217;t need a key anymore!
This new version is [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago Google introduced version 3 of Google Maps Javascript API (V3), a replacement of version 2. A lot of changes under the hood and this version is especially optimized for mobile devices such as Android and the iPhone. Also an interesting note : you don&#8217;t need a key anymore!</p>
<p>This new version is implemented using a modified MVC framework. Any state changes of an MVC object (such as a map) for example, are handled through setters and getters of a particular format. As well, all state of the MVC objects are stored as properties of that object, and all observation of state changes through event handlers is of a particular format as well.</p>
<p>But let&#8217;s start with a &#8220;Hello World&#8221;.</p>
<h4>Example &#8220;Hello World&#8221;</h4>
<pre>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no&quot; /&gt;
&lt;style type=&quot;text/css&quot;&gt;
  html { height: 100% }
  body { height: 100%; margin: 0px; padding: 0px }
  #map_canvas { height: 100% }
&lt;/style&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://maps.google.com/maps/api/js?sensor=set_to_true_or_false&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  function initialize() {
    var latlng = new google.maps.LatLng(52.2559251, 6.161336);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById(&quot;map_canvas&quot;),
                   myOptions);
  }

&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;initialize()&quot;&gt;
  &lt;div id=&quot;map_canvas&quot; style=&quot;width:100%; height:100%&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h4>DOC TYPE</h4>
<p>Google recommends that you declare a true DOCTYPE within your web application. Within the examples here, we&#8217;ve declared our applications as HTML5 using the simple HTML5 DOCTYPE as shown below:</p>
<pre>
&lt;!DOCTYPE html&gt;
</pre>
<p>The DOCTYPE is also designed to degrade gracefully; browsers that don&#8217;t understand it will ignore it, and use &#8220;quirks mode&#8221; to display their content.</p>
<p>Note that some CSS that works within quirks mode is not valid in standards mode. In specific, all percentage-based sizes must inherit from parent block elements, and if any of those ancestors fail to specify a size, they are assumed to be sized at 0 x 0 pixels. For that reason, we include the following  &lt;style&gt; declaration:</p>
<pre>
&lt;style type=&quot;text/css&quot;&gt;
  html { height: 100% }
  body { height: 100%; margin: 0px; padding: 0px }
  #map_canvas { height: 100% }
&lt;/style&gt;
</pre>
<h4>Loading the Google Maps API</h4>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;
 src=&quot;http://maps.google.com/maps/api/js?sensor=set_to_true_or_false&quot;&gt;
&lt;/script&gt;
</pre>
<h4>Displaying the map</h4>
<p>And with a simple </p>
<pre>
 &lt;div id=&quot;map_canvas&quot; style=&quot;width:100%; height:100%&quot;&gt;&lt;/div&gt;
</pre>
<p>You displays the map!</p>
<h4>Loading the Map</h4>
<pre>
&lt;body onload=&quot;initialize()&quot;&gt;
</pre>
<p>And with the event handler &#8216;onload&#8217;  on the body-tag, you&#8217;re map will be loaded and displayed!</p>
<p>Next time I&#8217;ll show you how you can use geo location.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/07/14/google-maps-api-welcome-to-version-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SWDC 2010: Building Linked Data Apps for the iPhone</title>
		<link>http://www.ihenk.com/2010/06/03/swdc-2010-building-linked-data-apps-for-the-iphone/</link>
		<comments>http://www.ihenk.com/2010/06/03/swdc-2010-building-linked-data-apps-for-the-iphone/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 14:33:55 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/06/03/swdc-2010-building-linked-data-apps-for-the-iphone/">admin</span></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=113</guid>
		<description><![CDATA[Presentation of Building Linked Data Apps for the iPhone:

]]></description>
			<content:encoded><![CDATA[<p>Presentation of Building Linked Data Apps for the iPhone:</p>
<p><video  src="http://www.ihenk.com/video/presentation.mov" controls="controls" width="400" ></video></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/06/03/swdc-2010-building-linked-data-apps-for-the-iphone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://www.ihenk.com/video/presentation.mov" length="22676289" type="video/quicktime" />
		</item>
		<item>
		<title>Scandinavian Web Developer Conference 2010</title>
		<link>http://www.ihenk.com/2010/04/26/scandinavian-web-developer-conference-2010/</link>
		<comments>http://www.ihenk.com/2010/04/26/scandinavian-web-developer-conference-2010/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 18:47:38 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/04/26/scandinavian-web-developer-conference-2010/">admin</span></dc:creator>
				<category><![CDATA[Linked Data]]></category>

		<guid isPermaLink="false">http://www.ihenk.com/?p=91</guid>
		<description><![CDATA[On 2 and 3 june Stockholm will be the hottest place of Scandinavia for designers, developers and architects. The Scandinavian Web Developer Conference 2010 is the largest event on web and mobile technologies. So for me its a great honor to be a speaker at this great conference.

I&#8217;ll will be talking about &#8221; Building Linked [...]]]></description>
			<content:encoded><![CDATA[<p>On 2 and 3 june Stockholm will be the hottest place of Scandinavia for designers, developers and architects. The Scandinavian Web Developer Conference 2010 is the largest event on web and mobile technologies. So for me its a great honor to be a speaker at this great conference.</p>
<p><a href="http://www.ihenk.com/wp-content/uploads/2010/04/340px-Skandia-Teatern_2009a1.jpg"><img src="http://www.ihenk.com/wp-content/uploads/2010/04/340px-Skandia-Teatern_2009a1-300x225.jpg" alt="" title="340px-Skandia-Teatern_2009a" width="300" height="225" class="aligncenter size-medium wp-image-93" /></a></p>
<p>I&#8217;ll will be talking about &#8221; Building Linked Data Applications for the iPhone&#8221;.  Linked Data is about using the Web to connect related data that wasn&#8217;t previously linked, or using the Web to lower the barriers to linking data currently linked using other methods.</p>
<p>In this presentation I will show you how you can use Linked Data in your iPhone application. I&#8217;ll be covering URIs, RDF, DBPedia, REST API, Google Maps API and the iPhone SDK.</p>
<p>For example other speakers will talk about : Mark Wubben &#8211; Building Browser extensions with Chrome, Patrick Chanezon &#8211; Google for Developers, Rik Arends &#8211; Developing Applications in the cloud and Thomas Fuchs &#8211; Stroke and Pinch &#8211; Multi-touch on the mobile web.</p>
<p>All very interesting! So  take a look at <a href="http://swdc-central.com/">www.swdc-central.com</a> and come to Stockholm!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/04/26/scandinavian-web-developer-conference-2010/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Presentation made in HTML5</title>
		<link>http://www.ihenk.com/2010/04/11/presentation-made-in-html/</link>
		<comments>http://www.ihenk.com/2010/04/11/presentation-made-in-html/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 05:11:54 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/04/11/presentation-made-in-html/">admin</span></dc:creator>
				<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.ordr.nl/ihenk/?p=78</guid>
		<description><![CDATA[I would like to show you how to make a presentation just in HTML. With the tag &#8216;canvas&#8217; you can create nice effects for texts. But also you can create effects for showing photos.
Here you can see the presentation.
First you have to define the slides:
var slide0 = function()
{
	initSlide(true);
	h2("Google Technology User Group");
	line("5 februari 2010")
};

A function for [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to show you how to make a presentation just in HTML. With the tag &#8216;canvas&#8217; you can create nice effects for texts. But also you can create effects for showing photos.</p>
<p><a href="http://www.ihenk.com/html5/presentation/presentation.html">Here</a> you can see the presentation.</p>
<p>First you have to define the slides:</p>
<pre lang="html">var slide0 = function()
{
	initSlide(true);
	h2("Google Technology User Group");
	line("5 februari 2010")
};</pre>
<p>
A function for drawing some text on the canvas:
</p>
<pre>
function h2(text)
{
	var ctx = document.getElementById('canvas').getContext('2d');
	ctx.font = "40pt Arial";
	ctx.textAlign = "center";
	ctx.fillStyle = "black";
	lineY = 200;
	ctx.fillText(text,x, y + lineY);
	lineY = lineY + 150;
}
</pre>
<p>And an example for some effects :</p>
<pre>
function slideEffect(slide){
  var ctx = document.getElementById('canvas').getContext('2d');
  ctx.save();
  ctx.clearRect(0,0,width,height);
  slide();
  ctx.restore();
  if (y < 75)
  {
     y = y + 20;
  }
	else
  {
	clearInterval(intervalEffect);
  }

}
</pre>
<p>
This way you can make your own presentation with animation just in HTML5!</p>
<p>Download : <a href="http://www.ihenk.com/html5/presentation.zip">presentation.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/04/11/presentation-made-in-html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tim Berners-Lee: The year open data went worldwide</title>
		<link>http://www.ihenk.com/2010/03/20/tim-berners-lee-the-year-open-data-went-worldwide/</link>
		<comments>http://www.ihenk.com/2010/03/20/tim-berners-lee-the-year-open-data-went-worldwide/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 14:18:49 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/03/20/tim-berners-lee-the-year-open-data-went-worldwide/">admin</span></dc:creator>
				<category><![CDATA[Linked Data]]></category>

		<guid isPermaLink="false">http://www.ordr.nl/ihenk/?p=76</guid>
		<description><![CDATA[Last year Tim Berners-Lee called for &#8220;raw data now&#8221; &#8212; for governments, scientists and institutions to make their data openly available on the web.
At TED University in 2010, he shows a few of the interesting results when the data gets linked up.
Tim Berners-Lee: The year open data went worldwide
]]></description>
			<content:encoded><![CDATA[<p>Last year Tim Berners-Lee called for &#8220;raw data now&#8221; &#8212; for governments, scientists and institutions to make their data openly available on the web.</p>
<p>At TED University in 2010, he shows a few of the interesting results when the data gets linked up.</p>
<p><a href='http://www.ted.com/talks/lang/eng/tim_berners_lee_the_year_open_data_went_worldwide.html' >Tim Berners-Lee: The year open data went worldwide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/03/20/tim-berners-lee-the-year-open-data-went-worldwide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Personal filters</title>
		<link>http://www.ihenk.com/2010/03/01/personal-filters/</link>
		<comments>http://www.ihenk.com/2010/03/01/personal-filters/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 20:52:18 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/03/01/personal-filters/">admin</span></dc:creator>
				<category><![CDATA[Linked Data]]></category>

		<guid isPermaLink="false">http://www.ordr.nl/ihenk/?p=73</guid>
		<description><![CDATA[Last week I was pondering about the iPad and I had to think about a book I read back in 1995 : Being Digital, Nicholas Negroponte. I looked up the book and browsing it. Suddenly I found the page I was looking for : Personal filters. The following paragraph was really striking:
&#8220;Imagine an electronic news [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was pondering about the iPad and I had to think about a book I read back in 1995 : Being Digital, Nicholas Negroponte. I looked up the book and browsing it. Suddenly I found the page I was looking for : Personal filters. The following paragraph was really striking:</p>
<p>&#8220;Imagine an electronic news delivered to your home as bits. Assume it is sent to a magical, paper-thin, flexible, waterproof, wireless, lightweight, bright display. The interface solution is likely to call upon&#8217;s years of experience with headlining and layout, typographic landmarks, images, and a host of techniques to assist browsing. Done well, this is likely to be a magnificent news medium.&#8221;</p>
<p>Sounds like a iPad&#8230;.</p>
<p>Further in the chapter Nicholas Negroponte  is describing a new kind of electronic newspaper. News filtered by your own interests. For example your reading behaviour on a sunday is different than on a monday. So you are also interested in different kinds of news.</p>
<p>Linked Data, a term used to describe a recommended best practice for exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF.  Such exposed data and computers like an iPad will give Personal Filters a bright future.</p>
<p>Resources<br />
Being Digital, Nicholas Negroponte, 1995</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/03/01/personal-filters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Groovy Code Sample</title>
		<link>http://www.ihenk.com/2010/02/21/groovy-code-sample/</link>
		<comments>http://www.ihenk.com/2010/02/21/groovy-code-sample/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 18:46:32 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.ihenk.com/2010/02/21/groovy-code-sample/">admin</span></dc:creator>
				<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.ordr.nl/ihenk/?p=67</guid>
		<description><![CDATA[For my latest project ProboGen, I needed the functionality to create and zip files. I found this this groovy code and show its show how powerfull groovy is.

File.metaClass.zip = { String destination ->
   def result = new ZipOutputStream(new FileOutputStream(destination))
    result.withStream {zipOutStream->
     delegate.eachFileRecurse { f ->
  [...]]]></description>
			<content:encoded><![CDATA[<p>For my latest project ProboGen, I needed the functionality to create and zip files. I found this this groovy code and show its show how powerfull groovy is.</p>
<pre lang="html">
File.metaClass.zip = { String destination ->
   def result = new ZipOutputStream(new FileOutputStream(destination))
    result.withStream {zipOutStream->
     delegate.eachFileRecurse { f ->
           if(!f.isDirectory()) {
              zipOutStream.putNextEntry(new ZipEntry(f.getPath()))
              new FileInputStream(f).withStream { inStream ->
                    def buffer = new byte[1024]
                    def count
                     while((count = inStream.read(buffer, 0, 1024)) != -1) {
                                zipOutStream.write(buffer)
                     }
              }
              zipOutStream.closeEntry()
            }
         }
        }
    }
</pre>
<p>To zip up a directory you can now just say:</p>
<p><code><br />
new File("/data/ft/").zip("/ft.zip");<br />
</code></p>
<p>This is really neat solution.</p>
<p>Thanks to : <a href="http://blog.xebia.com/2008/05/25/powerful-groovy/">powerful groovy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ihenk.com/2010/02/21/groovy-code-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

