<?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"
	>

<channel>
	<title>JBuzz-Word &#187; Groovy&amp;Grails</title>
	<atom:link href="http://people.byte-code.com/dpanelli/category/groovygrails/feed" rel="self" type="application/rss+xml" />
	<link>http://people.byte-code.com/dpanelli</link>
	<description>...Java, buzzwords and random development topics</description>
	<pubDate>Mon, 23 Jun 2008 13:49:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Coffee break application&#8230; a &lt; 30 minutes groovy application!</title>
		<link>http://people.byte-code.com/dpanelli/2008/03/04/coffe-break-application/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/03/04/coffe-break-application/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 08:55:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<category><![CDATA[Java JEE]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/03/04/coffe-break-application/</guid>
		<description><![CDATA[How many lines of code to do something like this?

def host = new Ghost(&#8220;barman.byte-code.com&#8220;)
def result = host.ls()
println result

think about it carefully&#8230; do you think it&#8217;s possible in less then 10?
Let&#8217;s pull out a groovy solution!
The server:
  1:import groovy.net.xmlrpc.*
 2:import java.net.ServerSocket
 3:
 4:def server = new XMLRPCServer()
 5:def socket = new ServerSocket(8080)
 6:
 7:server.executeShell = [...]]]></description>
			<content:encoded><![CDATA[<p>How many lines of code to do something like this?</p>
<blockquote><style type="text/css"><!-- .syntax0 { color: #000000; } .syntax1 { color: #cc0000; } .syntax2 { color: #ff8400; } .syntax3 { color: #6600cc; } .syntax4 { color: #cc6600; } .syntax5 { color: #ff0000; } .syntax6 { color: #9966ff; } .syntax7 { background: #ffffcc; color: #ff0066; } .syntax8 { color: #006699; font-weight: bold; } .syntax9 { color: #009966; font-weight: bold; } .syntax10 { color: #0099ff; font-weight: bold; } .syntax11 { color: #66ccff; font-weight: bold; } .syntax12 { color: #02b902; } .syntax13 { color: #ff00cc; } .syntax14 { color: #cc00cc; } .syntax15 { color: #9900cc; } .syntax16 { color: #6600cc; } .syntax17 { color: #0000ff; } .syntax18 { color: #000000; font-weight: bold; } .gutter { background: #dbdbdb; color: #000000; } .gutterH { background: #dbdbdb; color: #990066; } --></style>
<p><span class="syntax0"><span class="gutter"></span><span class="syntax9">def</span> host <span class="syntax18">=</span> <span class="syntax8">new</span> <span class="syntax6">Ghost</span><span class="syntax18">(</span><span class="syntax13">&#8220;</span><span class="syntax13">barman</span><span class="syntax13">.</span><span class="syntax13">byte</span><span class="syntax13">-</span><span class="syntax13">code</span><span class="syntax13">.</span><span class="syntax13">com</span><span class="syntax13">&#8220;</span><span class="syntax18">)</span><br />
<span class="gutter"></span><span class="syntax9">def</span> result <span class="syntax18">=</span> host.<span class="syntax6">ls</span><span class="syntax18">(</span><span class="syntax18">)</span><br />
<span class="gutter"></span><span class="syntax11">println</span> result<br />
</span></p></blockquote>
<p>think about it carefully&#8230; do you think it&#8217;s possible in less then 10?<br />
Let&#8217;s pull out a groovy solution!</p>
<p>The server:</p>
<blockquote><p> <span class="syntax0"><span class="gutter"> 1:</span><span class="syntax8">import</span> groovy.net.xmlrpc.*<br />
<span class="gutter"> 2:</span><span class="syntax8">import</span> java.net.ServerSocket<br />
<span class="gutter"> 3:</span><br />
<span class="gutter"> 4:</span><span class="syntax9">def</span> server <span class="syntax18">=</span> <span class="syntax8">new</span> <span class="syntax6">XMLRPCServer</span><span class="syntax18">(</span><span class="syntax18">)</span><br />
<span class="gutterH"> 5:</span><span class="syntax9">def</span> socket <span class="syntax18">=</span> <span class="syntax8">new</span> <span class="syntax6">ServerSocket</span><span class="syntax18">(</span><span class="syntax5">8080</span><span class="syntax18">)</span><br />
<span class="gutter"> 6:</span><br />
<span class="gutter"> 7:</span>server.executeShell <span class="syntax18">=</span> { commandArray <span class="syntax18">-&gt;</span><br />
<span class="gutter"> 8:</span>        <span class="syntax9">def</span> p <span class="syntax18">=</span> commandArray.<span class="syntax6">execute</span><span class="syntax18">(</span><span class="syntax18">)</span><br />
<span class="gutter"> 9:</span>        p.<span class="syntax6">waitFor</span><span class="syntax18">(</span><span class="syntax18">)</span><br />
<span class="gutterH">10:</span>        p.text<br />
<span class="gutter">11:</span>}<br />
<span class="gutter">12:</span><br />
<span class="gutter">13:</span>server.<span class="syntax6">startServer</span><span class="syntax18">(</span>socket<span class="syntax18">)</span><br />
</span></p></blockquote>
<p>And the client:</p>
<blockquote><p><span class="syntax0"><span class="gutter"> 1:</span><span class="syntax8">import</span> groovy.net.xmlrpc.*<br />
<span class="gutter"> 2:</span><br />
<span class="gutter"> 3:</span><span class="syntax10">class</span> Ghost{<br />
<span class="gutter"> 4:</span><br />
<span class="gutterH"> 5:</span>        <span class="syntax9">def</span> hostProxy<br />
<span class="gutter"> 6:</span><br />
<span class="gutter"> 7:</span>        <span class="syntax6">Ghost</span><span class="syntax18">(</span>host<span class="syntax18">)</span>{<br />
<span class="gutter"> 8:</span>          hostProxy <span class="syntax18">=</span> <span class="syntax8">new</span> <span class="syntax6">XMLRPCServerProxy</span><span class="syntax18">(</span><span class="syntax13">&#8220;</span><span class="syntax13">http</span><span class="syntax13">:</span><span class="syntax13">/</span><span class="syntax13">/</span><span class="syntax9">${</span><span class="syntax9">host</span><span class="syntax9">}</span><span class="syntax13">:</span><span class="syntax13">8080</span><span class="syntax13">&#8220;</span><span class="syntax18">)</span><br />
<span class="gutter"> 9:</span>        }<br />
<span class="gutterH">10:</span><br />
<span class="gutter">11:</span>        <span class="syntax9">def</span> <span class="syntax6">callCommand</span><span class="syntax18">(</span>methodName,params<span class="syntax18">)</span>{<br />
<span class="gutter">12:</span>                <span class="syntax9">def</span> commandArray <span class="syntax18">=</span> []<br />
<span class="gutter">13:</span>                commandArray &lt;&lt; methodName<br />
<span class="gutter">14:</span>                params.<span class="syntax11">each</span>{ commandArray &lt;&lt; <span class="syntax15">it</span> }<br />
<span class="gutterH">15:</span>                hostProxy.<span class="syntax6">executeShell</span><span class="syntax18">(</span>commandArray<span class="syntax18">)</span><br />
<span class="gutter">16:</span>        }<br />
<span class="gutter">17:</span><br />
<span class="gutter">18:</span>        <span class="syntax9">def</span> <span class="syntax6">methodMissing</span><span class="syntax18">(</span>String name , args<span class="syntax18">)</span>{<br />
<span class="gutter">19:</span>                callCommand name,args<br />
<span class="gutterH">20:</span>        }<br />
<span class="gutter">21:</span><br />
<span class="gutter">22:</span>}<br />
</span></p></blockquote>
<p>I&#8217;m just amazed&#8230; this is what I call next generation devlopemt: based on solid foundation of good java libs and move foward on top them.<br />
I don&#8217;t think this a full &#8220;production-ready&#8221; implementation but..it works!<br />
and they&#8217;re less the 10 line of code if you remove the &#8220;bloat&#8221;&#8230; half an hour work, a fullblown coffe break application!</p>
<p>Repeat&#8230; less then 10 line of code!</p>
<p>Happy groovin&#8217; , keep DRY and write less code that do more;)</p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/03/04/coffe-break-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2GX 2008 Quick View - Reston VA</title>
		<link>http://people.byte-code.com/dpanelli/2008/02/27/2gx-2008-quick-view-reston-va/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/02/27/2gx-2008-quick-view-reston-va/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 16:09:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/02/27/2gx-2008-quick-view-reston-va/</guid>
		<description><![CDATA[Hey all,
after the sunny Florida I drove up all the Interstate 95 and I reached Reston VA to attend to 2GX Groovy and Grails Experience!
It was absolutely great!
First I would like to compliments Jay and the NFJS team , because the organization was absolutely wonderful and professional, we arrived and find all that we need [...]]]></description>
			<content:encoded><![CDATA[<p>Hey all,</p>
<p>after the sunny Florida I drove up all the Interstate 95 and I reached Reston VA to attend to 2GX Groovy and Grails Experience!</p>
<p>It was absolutely great!</p>
<p>First I would like to compliments Jay and the NFJS team , because the organization was absolutely wonderful and professional, we arrived and find all that we need to enjoy the show(schedules, slides and so on&#8230;). I never attended to a NFJS  event  , because I&#8217;m european , but from now on I  will be very happy if NFJS tours will reach the other side of the atlantic;)</p>
<p>All session I&#8217;ve attended showed up with great contents and interesting topics, from metaprogramming to ui mashup and testing&#8230; really good works folks!</p>
<p>I really believe that  we&#8217;ve found the in Groovy the new Java 2.0 ,as said many times during the conference, with the ability to reuse all the good stuff that the Java World has created(and there&#8217;s a lot of good stuff out there!) and in Grails a easy path to web application development. It was a long time that I felt so positive about a new technology&#8230; and that&#8217;s great! Moreover the community is growing fast and steady , and the community is THE base for any successful opensource project (maybe someone has forgot that&#8230;).</p>
<p>I will advise everyone that as the opportunity to not miss the next 2GX in San Jose coming in October&#8230;</p>
<p>so, when in Europe , or better in some beautiful place in Italy?</p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/02/27/2gx-2008-quick-view-reston-va/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grails 1.0 RPM</title>
		<link>http://people.byte-code.com/dpanelli/2008/02/05/grails-10-rpm/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/02/05/grails-10-rpm/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 16:22:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/02/05/grails-10-rpm/</guid>
		<description><![CDATA[Hi folks,
today Grails 1.0 was released, as usual I prepared the package for rpm-based systems.
Get it here , and congratulations to all the Grails&#38;Groovy community.
Davide
]]></description>
			<content:encoded><![CDATA[<p>Hi folks,</p>
<p>today Grails 1.0 was released, as usual I prepared the package for rpm-based systems.</p>
<p>Get it <a href="http://people.byte-code.com/dpanelli/grails-1.0-5.noarch.rpm" title="Grails Rpm">here</a> , and congratulations to all the Grails&amp;Groovy community.</p>
<p>Davide</p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/02/05/grails-10-rpm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Groovy &#038; Wicket</title>
		<link>http://people.byte-code.com/dpanelli/2008/02/04/groovy-wicket/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/02/04/groovy-wicket/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 10:01:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<category><![CDATA[Java JEE]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/02/04/groovy-wicket/</guid>
		<description><![CDATA[Hi all,
given some requests I publish a classresolver for Wicket that enable groovy pages &#38; components to be hot reloaded in development mode.
I suppose you have a project with maven and so let&#8217;s start&#8230;

 Get the &#8220;mighty&#8221; GrovvyClassResolver
(fix up the package)
Open the WebApplication class and do something like that (remember that I use maven &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>given some requests I publish a classresolver for Wicket that enable groovy pages &amp; components to be hot reloaded in development mode.<br />
I suppose you have a project with maven and so let&#8217;s start&#8230;</p>
<ol>
<li> Get the &#8220;mighty&#8221; <a href="http://people.byte-code.com/dpanelli/wp-content/uploads/2008/02/groovyclassresolver.java" title="GrovvyClassResolver">GrovvyClassResolver</a></li>
<li>(fix up the package)</li>
<li>Open the WebApplication class and do something like that (remember that I use maven &amp; jetty for dev, If u have a different project structure change the path of the BASE_SRC constant pointing to your source dirs)
<ol>
<li>
<pre>
<style type="text/css">

.ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }

.s0 { color: rgb(128,128,128); font-style: italic; }

.s1 { color: rgb(128,128,128); font-weight: bold; font-style: italic; }

.s2 { }

.s3 { color: rgb(0,0,128); font-weight: bold; }

.s4 { color: rgb(0,128,0); font-weight: bold; }
</style>

<span class="s0">/**

<a title="l35" name="l35"></a> *

<a title="l36" name="l36"></a> * </span><span class="s1"><a title="l36" name="l36"></a>@author </span><span class="s0"><a title="l36" name="l36"></a>Byte-Code Srl 2004-2007

<a title="l37" name="l37"></a> */</span><span class="s2"><a title="l37" name="l37"></a>

<a title="l38" name="l38"></a></span><span class="s3"><a title="l38" name="l38"></a>public class </span><span class="s2"><a title="l38" name="l38"></a>GroovierWebApplication </span><span class="s3"><a title="l38" name="l38"></a>extends </span><span class="s2"><a title="l38" name="l38"></a>WebApplication {

<a title="l39" name="l39"></a>

<a title="l40" name="l40"></a>    </span><span class="s3"><a title="l40" name="l40"></a>public static final </span><span class="s2"><a title="l40" name="l40"></a>String BASE_SRC = </span><span class="s4"><a title="l40" name="l40"></a>"src/main/java/"</span><span class="s2"><a title="l40" name="l40"></a>;

<a title="l41" name="l41"></a>

<a title="l42" name="l42"></a>

<a title="l43" name="l43"></a>    </span><span class="s3"><a title="l43" name="l43"></a>protected void </span><span class="s2"><a title="l43" name="l43"></a>init() {

<a title="l44" name="l44"></a>        initSpringContext();

<a title="l45" name="l45"></a>

<a title="l46" name="l46"></a></span><span class="s2">

<a title="l48" name="l48"></a>        getResourceSettings().setThrowExceptionOnMissingResource(</span><span class="s3"><a title="l48" name="l48"></a>false</span><span class="s2"><a title="l48" name="l48"></a>);

<a title="l49" name="l49"></a>

<a title="l50" name="l50"></a>        String configurationType = getConfigurationType();

<a title="l51" name="l51"></a>        </span><span class="s3"><a title="l51" name="l51"></a>if </span><span class="s2"><a title="l51" name="l51"></a>(configurationType.equals(DEVELOPMENT)) {

<a title="l52" name="l52"></a>            getResourceSettings().addResourceFolder(BASE_SRC);

<a title="l53" name="l53"></a>

<a title="l54" name="l54"></a>            getApplicationSettings().setClassResolver(</span><span class="s3"><a title="l54" name="l54"></a>new </span><span class="s2"><a title="l54" name="l54"></a>GroovyClassResolver(BASE_SRC));

<a title="l55" name="l55"></a>        }

<a title="l56" name="l56"></a>    } }</span></pre>
</li>
</ol>
</li>
<li>You&#8217;re done! Now you can develop in wicekt using groovy &amp; hot reload pages and components.</li>
<li>As a side note remember to create a production profile so when you deploy the war the groovy class are compiled and you won&#8217;t loose any performances!</li>
<li>Ok, now you have to transfer some bucks to my account&#8230; or it won&#8217;t work! <img src='http://people.byte-code.com/dpanelli/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ol>
<p>Ok, that&#8217;s all folks, if u have problem just drop me an email!</p>
<p>D</p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/02/04/groovy-wicket/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JBoss World and 2G Expreience!! Here we go!</title>
		<link>http://people.byte-code.com/dpanelli/2008/01/21/jboss-world-and-2g-expreience-here-we-go/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/01/21/jboss-world-and-2g-expreience-here-we-go/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 12:53:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<category><![CDATA[Java JEE]]></category>

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

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/01/21/jboss-world-and-2g-expreience-here-we-go/</guid>
		<description><![CDATA[Now I&#8217;m almost set up!! And very happy that this year I will attend to JBoss World!
And the week after to 2G Experience !
I&#8217;m looking forward to give you a live coverage of the events form the states, so stay tuned between 10 &#38; 24 feb !
]]></description>
			<content:encoded><![CDATA[<p>Now I&#8217;m almost set up!! And very happy that this year I will attend to <a href="http://www.jbossworld.com">JBoss World</a>!<br />
And the week after to 2G Experience !</p>
<p>I&#8217;m looking forward to give you a live coverage of the events form the states, so stay tuned between 10 &amp; 24 feb !</p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/01/21/jboss-world-and-2g-expreience-here-we-go/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Another RPM Update for Grails</title>
		<link>http://people.byte-code.com/dpanelli/2008/01/21/another-rpm-update-for-grails/</link>
		<comments>http://people.byte-code.com/dpanelli/2008/01/21/another-rpm-update-for-grails/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 12:49:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Groovy&amp;Grails]]></category>

		<category><![CDATA[Java JEE]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/dpanelli/2008/01/21/another-rpm-update-for-grails/</guid>
		<description><![CDATA[it requires a lot of action!
Take it Grails-1.0-RC4 
]]></description>
			<content:encoded><![CDATA[<p>it requires a lot of action!</p>
<p>Take it <a href="http://people.byte-code.com/dpanelli/grails-1.0-4.noarch.rpm">Grails-1.0-RC4 </a></p>
]]></content:encoded>
			<wfw:commentRss>http://people.byte-code.com/dpanelli/2008/01/21/another-rpm-update-for-grails/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

