<?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>Cantina Consulting &#187; adam</title>
	<atom:link href="http://www.cantinaconsulting.com/author/adam/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cantinaconsulting.com</link>
	<description></description>
	<pubDate>Thu, 01 May 2008 16:35:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Chris Lamothe joins Cantina as User Experience Principal</title>
		<link>http://www.cantinaconsulting.com/2008/05/01/chris-lamothe-joins-cantina-as-user-experience-principal/</link>
		<comments>http://www.cantinaconsulting.com/2008/05/01/chris-lamothe-joins-cantina-as-user-experience-principal/#comments</comments>
		<pubDate>Thu, 01 May 2008 16:33:40 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[People]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2008/05/01/chris-lamothe-joins-cantina-as-user-experience-principal/</guid>
		<description><![CDATA[Please join me in welcoming Chris Lamothe, the newest partner at Cantina Consulting, as a User Experience Principal.
Chris brings nearly 10 years of experience in a variety of aspects of user-centric design and interactive development, with specific areas of focus in e-learning and Rich Internet Application (RIA) design and development.
Both Matt and I have worked [...]]]></description>
			<content:encoded><![CDATA[<p>Please join me in welcoming Chris Lamothe, the newest partner at Cantina Consulting, as a User Experience Principal.</p>
<p>Chris brings nearly 10 years of experience in a variety of aspects of user-centric design and interactive development, with specific areas of focus in e-learning and Rich Internet Application (RIA) design and development.</p>
<p>Both Matt and I have worked alongside Chris in the past, during consulting engagements at Molecular as well as a variety of side projects over the years. We&#8217;re thrilled to have Chris a partner as Cantina continues to grow.</p>
<p>Feel free to read Chris&#8217; bio in the <a href="/about">About</a> section.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2008/05/01/chris-lamothe-joins-cantina-as-user-experience-principal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gotchas in using BackgrounDRb in Ruby on Rails</title>
		<link>http://www.cantinaconsulting.com/2008/04/22/gotchas-in-using-backgroundrb-in-ruby-on-rails/</link>
		<comments>http://www.cantinaconsulting.com/2008/04/22/gotchas-in-using-backgroundrb-in-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 03:02:12 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2008/04/22/gotchas-in-using-backgroundrb-in-ruby-on-rails/</guid>
		<description><![CDATA[I&#8217;ve been working on a bit of code to perform audio and video encoding for media files uploaded to one of our client&#8217;s sites and I was thrilled to come across BackgrounDRb, a Rails plugin that allows developers to build scheduled background tasks, similar to the OpenSympony&#8217;s Quartz for Java. The plugin also allows you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a bit of code to perform audio and video encoding for media files uploaded to one of our client&#8217;s sites and I was thrilled to come across BackgrounDRb, a Rails plugin that allows developers to build scheduled background tasks, similar to the OpenSympony&#8217;s <a href="http://www.opensymphony.com/quartz/">Quartz</a> for Java. The plugin also allows you to allow user actions to initiate long running processes by spawning worker threads from controllers (or other places).</p>
<p>Of particular interest to me was the ability to spawn (fork) worker threads from user actions, or in this case, ActiveRecord callbacks which were called when the user action caused my model object to be saved. The basic order of operations is this:</p>
<ol>
<li>User uploads an audio file</li>
<li>Uploaded file data is loaded into an attachment_fu model object</li>
<li>Model object is saved</li>
<li>Model object&#8217;s after_save callback is called</li>
<li>The after_save callback determines whether the uploaded file requires encoding, and spawns a BackgrounDRb worker process if it does</li>
</ol>
<p>In this process lay many issues. I&#8217;ve attempted to describe some of them below.</p>
<p><strong>Close your connections</strong></p>
<p>This may be obvious to many, but I figured with all that ActiveRecord does for you, that if I do some work with ActiveRecord in a BackgrounDRB worker process, my database connections would be closed automatically. This was not the case, however it can be quickly remedied by adding the following after all your code is done doing what it needs to do:</p>
<p>ActiveRecord::Base.connection.disconnect!</p>
<p><strong>Don&#8217;t try to pass entire ActiveRecord objects to workers from Rails</strong></p>
<p>I started building a simple call to spawn a new BackgrounDRb worker from an ActiveRecord lifecycle callback method (see below), and starting running into errors like these:</p>
<pre>
undefined method `[]&#8216; for #&lt;DRb::DRbUnknown:0&#215;2501bd4&gt;
</pre>
<p></p>
<p>I found a number of postings online indicating that simply adding the following to my model objects would clear this up:</p>
<pre>
include DRbUndumped
</pre>
<p>Doing so did not fix my undefined method problems, so when I came across this on another blog, I decided to cut my losses and just pass the database ID.</p>
<blockquote>
<p><span style="font-weight: normal;">When passing arguments from Rails to BackgrounDRb workers, don’t pass huge ActiveRecord objects. Its asking for trouble. You can easily circumvent the situation by passing id of AR objects.<a href="http://gnufied.org/2008/02/12/backgroundrb-best-practises/"></a></span></p>
<p>From: <a href="http://gnufied.org/2008/02/12/backgroundrb-best-practises/">BackgrounDRb best practises</a></p>
</blockquote>
<p>One thing that I didn&#8217;t think I&#8217;d be dealing with in coming to Rails from a Java background is serialization issues, but there we have it.</p>
<p><strong>Don&#8217;t create new workers from new record callbacks</strong></p>
<p>This may have been common knowledge, but I had to discover this the hard way. The after_save callback in ActiveRecord model objects is called before the save transaction has been committed. The implication this has is that if I pass an ID of an ActiveRecord object to BackgrounDRb for further processing, strange things can happen.</p>
<p>In the case of my after_save callback being called on a newly created object, I found that most of the time, by the time the BackrounDRb process starts working and tries to retrieve the object using the ID I have passed, my original object.save() transaction has not yet committed, so I get errors indicating the record could not be found, even though I check the database no more than a second later and the record is there and intact.<br />
It seems that I&#8217;m not the only one that was looking for a post-commit callback:</p>
<ul>
<li><a href="http://elimiller.blogspot.com/2007/06/proper-cache-expiry-with-aftercommit.html">Proper cache expiry with after_commit</a><a href="http://localhost3000.de/2008/02/12/a-good-thing-to-know-after_save-sits-inside-the-transaction/"></a></li>
<li><a href="http://localhost3000.de/2008/02/12/a-good-thing-to-know-after_save-sits-inside-the-transaction/">A good thing to know: after_save sits inside the transaction</a></li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2008/04/22/gotchas-in-using-backgroundrb-in-ruby-on-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happenings</title>
		<link>http://www.cantinaconsulting.com/2008/02/07/happenings/</link>
		<comments>http://www.cantinaconsulting.com/2008/02/07/happenings/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 18:33:10 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2008/02/07/happenings/</guid>
		<description><![CDATA[There&#8217;s been a bit of radio silence on our blog lately, and it&#8217;s for good reason!&#160; We&#8217;ve been busy on several Rails and Grails-based projects lately which is why we&#8217;re very excited about the releases of both Rails 2.0.x and the first full 1.0 release of the Grails framework.&#160;
The Grails release in particular is significant [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a bit of radio silence on our blog lately, and it&#8217;s for good reason!&nbsp; We&#8217;ve been busy on several Rails and Grails-based projects lately which is why we&#8217;re very excited about the releases of both Rails 2.0.x and the first full 1.0 release of the Grails framework.&nbsp;</p>
<p>The Grails release in particular is significant as the framework has finally emerged from &quot;in development&quot; status which removes one more barrier for web project teams and IT departments to using the framework.&nbsp; We&#8217;ve had success with the Grails framework particularly due to the fact that it sits very well in the Java enterprise ecosystem, including the relatively straightforward integration of existing Java-based Hibernate models.&nbsp; This integration with Hibernate, which is a key factor in Grails&#8217; ability to be a contender for new IT projects with teams that are Java EE and Spring/Hibernate-oriented, is a fairly straightorward process that involves dropping in your existing mapping XML and Java POJOs.&nbsp; As if by some magic, you get all the benefits of GORM on your existing Java POJO data model, including dynamic search methods and the criteria builder DSL.</p>
<ul>
<li>Groovy on Grails 1.0: <a href="http://grails.org/1.0+Release+Notes">http://grails.org/1.0+Release+Notes</a></li>
<li>Groovy/Grails Zone on DZone: <a href="http://groovy.dzone.com/">http://groovy.dzone.com/</a></li>
<li>Ruby on Rails 2.0: <a href="http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done">http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2008/02/07/happenings/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amazon EC2: 1st Impressions Mounting S3</title>
		<link>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/</link>
		<comments>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 19:18:28 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Amazon Web Services]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/</guid>
		<description><![CDATA[We&#8217;ve got a small internal project at Cantina that aims to make use of the Groovy on Grails framework and some of our Grails plugins, and we plan on using S3 as the persistent storage for the project.&#160; We decided to test out a small EC2 instance at Amazon to use as an integration point [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got a small internal project at Cantina that aims to make use of the Groovy on Grails framework and some of our <a href="/grails-plugins/">Grails plugins</a>, and we plan on using S3 as the persistent storage for the project.&nbsp; We decided to test out a small EC2 instance at Amazon to use as an integration point for the project for a couple reasons:</p>
<ul>
<li>EC2 instances are very quick to setup</li>
<li>They are not charged for data transfer to S3</li>
<li>They are presumably the closest you can be to your S3 storage in terms of network latency</li>
</ul>
<p>Setting up our initial EC2 instance was incredibly easy.&nbsp; There&#8217;s a wealth of pre-built Amazon Machine Images, or AMIs, out there with various configurations for different application servers, including Apache, MySQL, JBoss, Tomcat, and, our new favourite, Red5.&nbsp; I was able to get one up and running fairly quickly with the packages I needed (I love <a href="http://linux.duke.edu/projects/yum/">yum</a>).&nbsp;</p>
<p>Actually, I was floored by how fast I had a brand new server up and running, considering I&#8217;ve had requests submitted to fairly large enterprise grade hosting companies for such intensely complicated things as, say opening a new port in the firewall, take over a week.&nbsp; I guess the landscape is changing, but I digress&#8230;</p>
<p>In order to use Amazon S3 as the backing store for our new EC2 instance, we seemed to have a few options:</p>
<ol>
<li>Code our application to manage the transfer and synchronization of files to S3, perhaps via our <a href="/grails-plugins/amazon-s3-plugin/">Amazon S3 Grails Plugin</a></li>
<li>Utilize an S3-aware file synchronization tool such as the <a href="http://jets3t.s3.amazonaws.com/applications/applications.html#synchronize">jets3t Synchronize tool</a>, or the Ruby <a href="http://s3sync.net">s3sync</a> tool</li>
<li>Mount S3 as a filesystem in the EC2 instance</li>
</ol>
<p>Since we&#8217;ve already been doing #1, and #2 isn&#8217;t exactly real-time, we decided to give #3 a go.&nbsp; To do so, we enlisted the help of a couple of tools:</p>
<ul>
<li><a href="http://www.jungledisk.com">JungleDisk</a>: A multi-platform tool that provides a local WebDAV interface to S3, suitable for mounting as a filesystem from the Mac OS X Finder, or from Linux using&#8230;</li>
<li><a href="http://dav.sourceforge.net/">davfs2</a>: Linux filesystem driver that will mount a WebDAV URL to a mount point in the local filesystem</li>
</ul>
<p>JungleDisk is a great tool in general for interacting with an S3 account, and I&#8217;ve been using it for a little while now for my own backup purposes on my Mac development laptop.&nbsp; The Linux version provides a standalone command line program (in addition to the GUI that comes on all platforms) which can be run as a daemon and scripted to startup on boot.&nbsp;</p>
<p>The setup was surprisingly simple.&nbsp; To get JungleDisk running from the command line client, you need to provide a configuration file, commonly called jungledisk-settings.ini.&nbsp; The documentation says that you should run the GUI first to generate the file before running the command line version, but I was able to copy over the file from my Mac laptop and update the values for the EC2 instance.&nbsp; Here&#8217;s an example of the configuration file:</p>
<p><code>LoginUsername=<br />
LoginPassword=PROTECTED:<br />
AccessKeyID=XXXXXXXXXXXXXXXXXXXXX<br />
SecretKey=PROTECTED:XXXXXXXXXXXXXXXXXXXXX<br />
Bucket=default<br />
CacheDirectory=/var/cache/jungledisk<br />
ListenPort=2667<br />
CacheCheckInterval=120<br />
AsyncOperations=1<br />
Encrypt=0<br />
ProxyServer=<br />
EncryptionKey=PROTECTED:<br />
DecryptionKeys=PROTECTED:<br />
MaxCacheSize=1000<br />
MapDrive=<br />
UseSSL=0<br />
RetryCount=3<br />
FastCopy=1<br />
WebAccess=0<br />
LogDuration=30<br />
ArchiveFlag=5<br />
ArchiveDuration=60<br />
PasswordPrompt=0</code></p>
<p>I setup jungledisk to startup on boot using a really handy /etc/init.d script from the JungleDisk forums found <a href="http://forum.jungledisk.com/viewtopic.php?t=6337">here</a>.</p>
<p>Once JungleDisk was configured and running, I had a local WebDAV server running at http://localhost:2667.&nbsp; This could be used in the KDE to browse the filesystem, but since I&#8217;d like my web application to be able to access it via the filesystem, the next step was to get davfs2 running.</p>
<p>The EC2 instance did not have davfs2 installed by default (at least not the AMI I chose, which was based on the default AMI), so I simply downloaded the source distribution and compiled locally on the EC2 instance.&nbsp; The base AMI I was using did not have gcc or the neon development libraries (<a href="http://www.webdav.org/neon/">Neon</a> is a WebDAV library that davfs2 uses for communicating with WebDAV servers).&nbsp; Luckily yum was installed on the EC2 instance so getting these dependencies was pretty straightforward.</p>
<p>davfs2 can be configured to run by non-root users, or by root.&nbsp; The configuration of davfs2 depends on your choice here as some configuration options are intended only for system wide davfs2 configuration started from root.&nbsp; I opted to take this approach, setup my /usr/local/etc/davfs2.conf file with the following configuration options:</p>
<p><code> dav_user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mydavuser<br />
dav_group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mydavgroup<br />
kernel_fs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fuse<br />
ask_auth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</code></p>
<p>Since JungleDisk provides WebDAV access to localhost only, and does not require authentication, setting ask_auth to 0 is useful to prevent davfs2 from prompting for a password when mounting the WebDAV URL.&nbsp; Last but not least, I added an entry to /etc/fstab to configure the mount:</p>
<p><code>http://localhost:2667 /mountpoint davfs nolocks,noaskauth,rw</code></p>
<p>Voila!&nbsp; Now my S3 instance is mounted to the local Linux filesystem on my EC2 instance.&nbsp; I have not done any performance testing or cache tuning, but this <a href="http://info.rightscale.com/2007/11/29/network-performance-in-ec2-and-s3">article</a> over at Right Scale looks promising.&nbsp; Once we have our application and up and running, I&#8217;ll post back with some more information on how this configuration is working.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>One step closer to Grails 1.0</title>
		<link>http://www.cantinaconsulting.com/2007/12/04/one-step-closer-to-grails-10/</link>
		<comments>http://www.cantinaconsulting.com/2007/12/04/one-step-closer-to-grails-10/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 15:18:22 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Groovy on Grails]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2007/12/04/one-step-closer-to-grails-10/</guid>
		<description><![CDATA[Graeme and the Grails community have been hard at work lately getting Grails ready for a 1.0 release, and the latest release candidate, RC2 is quite indicative of their labors.&#160; There are some impressive additions to this release, including a initial pass at a full set of reference documentation, Spring 2.5, and over 140 bug [...]]]></description>
			<content:encoded><![CDATA[<p>Graeme and the Grails community have been hard at work lately getting Grails ready for a 1.0 release, and the latest release candidate, RC2 is quite indicative of their labors.&nbsp; There are some impressive additions to this release, including a initial pass at a full set of <a href="http://grails.org/doc/1.0.x/">reference documentation</a>, Spring 2.5, and over 140 <a href="http://jira.codehaus.org/browse/GRAILS?report=com.atlassian.jira.plugin.system.project:changelog-panel">bug fixes and improvements</a>.&nbsp; This is truly a herculean effort, and I can&#8217;t wait to start testing our plugins in RC2.&nbsp;</p>
<p>You can check get the latest and greatest, as always, at <a href="http://grails.org">grails.org.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/12/04/one-step-closer-to-grails-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hot Off The Press: An Amazon S3 Plugin for Groovy on Grails</title>
		<link>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/</link>
		<comments>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 18:22:44 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Amazon Web Services]]></category>

		<category><![CDATA[Groovy on Grails]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/</guid>
		<description><![CDATA[We&#8217;ve released our first ever plugin for the Groovy on Grails web application framework!&#160; You can see the details over on our new Grails Plugins page.&#160;
In short, we wanted to build something that would manage static file assets such as images, movies, audio, Flash, and perhaps down the road, site backups, on the Amazon Simple [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve released our first ever plugin for the Groovy on Grails web application framework!&nbsp; You can see the details over on our new <a href="http://www.cantinaconsulting.com/grails-plugins/">Grails Plugins</a> page.&nbsp;</p>
<p>In short, we wanted to build something that would manage static file assets such as images, movies, audio, Flash, and perhaps down the road, site backups, on the Amazon Simple Storage Service (S3).&nbsp;</p>
<p>This is a very preliminary version of the plugin, and we&#8217;re hoping to get some good feedback from the <a href="http://grails.codehaus.org/Mailing+lists" target="_blank">Grails Community</a> and you on what we can do better.&nbsp; However, there may be some bugs that we haven&#8217;t quite gotten to yet.&nbsp;</p>
<p>Feel free to leave comments regarding the plugin on this posting.&nbsp; We know we have a lot more testing to do and features to add, so any feedback is most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What I like about Groovy on Grails</title>
		<link>http://www.cantinaconsulting.com/2007/10/26/what-i-like-about-groovy-on-grails/</link>
		<comments>http://www.cantinaconsulting.com/2007/10/26/what-i-like-about-groovy-on-grails/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 16:35:51 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Groovy on Grails]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/?p=14</guid>
		<description><![CDATA[First let me congratulate all the folks that have been going crazy getting the Groovy on Grails (grails.org) framework to version 1.0 (almost there!).  Just when I think my 0.5.6 version is going to be around for a while, they start releasing more versions, with a fury.
We&#8217;ve used Java here at Cantina on innumerable [...]]]></description>
			<content:encoded><![CDATA[<p>First let me congratulate all the folks that have been going crazy getting the Groovy on Grails (<a href="http://grails.org" target="_blank">grails.org</a>) framework to version 1.0 (almost there!).  Just when I think my 0.5.6 version is going to be around for a while, they start releasing more versions, with a fury.</p>
<p>We&#8217;ve used Java here at Cantina on innumerable projects with a great deal of success.  The toolset is very complete and Spring and Hibernate have been a godsend for allowing us to focus on the intellectual &quot;meat&quot; of a project.  Then, in an effort to explore some new technology for a couple prototypes we were working on we found Grails.</p>
<p>I think the first thing that drew us (me) to Grails was the mantra that I heard over and over again at a talk given by Venkat Subramaniam at Sun a while ago regarding Groovy on Grails have more &quot;signal to noise&quot;.  Less syntactical noise, more  code signal (i.e., the &quot;meat&quot;).  In his talk he threw together an AJAX enabled form in about 10-15 minutes with all the CRUD and validation you need.</p>
<p>Once we started using Grails in house, it quickly became apparent how deep the mantra of having a greater &quot;signal to noise&quot; went.  We love Spring and Hibernate but we hate XML configuration.  Yes, XML is ubiquitous, very readable, and supported everywhere, but, as technologies like Spring and Hibernate put more of our application structure into XML, it makes it very hard to <em>debug</em> all of our application when some of the structure sits in very static XML.</p>
<p>Grails provides a great approach to this.  Through the Grails BeanBuilder, you specify all of that lovely Spring configuration within a very readable and debuggable Groovy syntax.  This makes for a much more powerful way to configure the structure of your application as well as allows you to actually step through parts of your configuration with a debugger.</p>
<p>Of course, Grails does a whole lot more than that (including a lot of the auto-wiring in Spring so that you  don&#8217;t have to do <em>any</em> configuration), and here are just some of the things that caught our eye:</p>
<ul>
<li>GORM (Grails Object Relational Mapper): as if Hibernate wasn&#8217;t powerful enough, Grails adds some useful methods of querying and mapping your object model that go above and beyond Hibernate.  With dynamic methods, you can query against properties of your object model classes (domain classes) via methods that you never have to write, like this:<br />
    <span class="Code"><br />
    // Assuming you have a domain class called &quot;Person&quot; <br />
    // with a name property and a type property that </span><span class="Code"><br />
    // can be &quot;employee&quot; or &quot;customer&quot;&nbsp;&nbsp; </p>
<p>    def allPeople = Person.findAll()&nbsp; <br />
    def onlyEmployees = Person.findByType(&quot;employee&quot;)&nbsp; <br />
    def howManyEmployees = Person.countByType(&quot;employee&quot;)</span></p>
<p>    I didn&#8217;t have to write any of these find* or count* methods, they come free of charge with GORM which makes the simple queries a lot easier to manage.</li>
<li>Auto-reloading: one thing that has always plagued us as Java developers is the development cycle of fix -&gt; deploy -&gt; start -&gt; test.  There are certainly ways to reduce this cycle in Java, but sometimes the project just doesn&#8217;t allow for it.  Grails is built with the mindset that changes to most code assets should be reflected instantly in the running application, thus reducing the time it takes to test code changes</li>
<li>TagLibs: Creating GSP (analogous to JSP) tag libraries requires much less code and no configuration to get your tags and and running</li>
<li>Intellij IDEA Integration: I love <a href="http://www.macromates.com">TextMate</a> as much as the next guy, but code completion and debugging are things I&#8217;ve just gotten too used to (call me lazy).  The Groovy/Grails plugin for Intellij IDEA has come a long way towards making Grails a first class IDE citizen.</li>
<li>Legacy Integration:  A lot of the projects we work on involves an existing Java application and SQL database.  There is often business logic already implemented in Java classes (Spring or otherwise) that really don&#8217;t need to be rewritten.  Since, at the end of the day, Grails is Java, we can make use of the existing codebase in a way that is much more seamless than if we were to introduce another web technology.  Also, the fact that it&#8217;s all Hibernate under the hood makes it easier to adapt a set of domain classes to an existing database schema.  This makes Grails an easier sell on those technical re-architecture projects in the Java world.</li>
</ul>
<p>Beyond the technology, there&#8217;s just a lot of momentum in the Grails community.  Within the last year that I&#8217;ve been watching, Grails has gone from a 0.4 to just about 1.0 (I&#8217;ve been using PHP frameworks that haven&#8217;t bumped the minor version number in over 2 years).  There&#8217;s a healthy and growing list of plugins (<a href="http://grails.org/Plugins">grails.org/Plugins</a>) that seem to be addressing the core needs of new application development.&nbsp; We&#8217;re really looking forward to the next Grails project and experiencing a lot more signal and a lot less noise.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/10/26/what-i-like-about-groovy-on-grails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Benvenuto!</title>
		<link>http://www.cantinaconsulting.com/2007/10/19/benvenuto/</link>
		<comments>http://www.cantinaconsulting.com/2007/10/19/benvenuto/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 19:57:16 +0000</pubDate>
		<dc:creator>adam</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/?p=6</guid>
		<description><![CDATA[Greetings and salutations to all, and welcome to the very first blog post at Cantina.
First things are always first, and in the spirit of blogging as a new form of journalism (not http://en.wikipedia.org/wiki/New_Journalism) let&#8217;s get the main questions that any reporter would ask out of the way:
Who
We&#8217;re a new boutique internet technology shop specializing in [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings and salutations to all, and welcome to the very first blog post at Cantina.</p>
<p>First things are always first, and in the spirit of blogging as a new form of journalism (not <a title="New Journalism" target="_blank" href="http://en.wikipedia.org/wiki/New_Journalism">http://en.wikipedia.org/wiki/New_Journalism</a>) let&#8217;s get the main questions that any reporter would ask out of the way:</p>
<p><strong>Who</strong></p>
<p>We&#8217;re a new boutique internet technology shop specializing in whatever it takes to effectively produce web things (see About section).</p>
<p><strong>What</strong></p>
<p>What do we do?  Well, sometimes it involes banging our heads against the wall, but at the end of the day we make great web sites and applications using best of breed practices and technologies (yes, you can read Web 2.0 in there).</p>
<p><strong>When</strong></p>
<p>We&#8217;ve been doing this for over 15+ years combined, but the blog starts today.</p>
<p><strong>Why</strong></p>
<p>We often ask ourselves that same question, but in the end, we love what we do!</p>
<p><strong>How</strong></p>
<p>Using some of these: agile methodologies, iterative design and development, rapid development frameworks and lots of testing.</p>
<p>In the process of doing what we do, we end up figuring some things out, and as part of the open source credo of &#8220;share what you know&#8221; (which sometimes comes in the form of &#8220;patch it if it&#8217;s broken&#8221;), we decided to start blogging about our little victories against buggy code.  We hope that you find at least something that we&#8217;ve written here useful, and who knows, maybe someday we can do business together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/10/19/benvenuto/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
