 Click to Play |  Title Tag Tips This is your WebProNews tip of the day, from our new studio in Lexington, Kentucky. Today, Mike McDonald gives you some tips on WordPress title tags... |
| Latest
Web News |
Critical outage hits BlackBerry users AUSTRALIA may not have escaped the massive BlackBerry outage in the North America completely, its maker Research In Motion (RIM) said. The massive outage that wiped out addictive mobile internet...
Packaged as local experts on search optimising The early private equity backers of Facebook and MySpace have hit the Australian market with former Microsoft and PBL executives and plan to nab...
Foreign Affairs to monitor global network with Opengear Opengear, an Australian start-up specialising in open-source based appliance for remotely managing IT infrastructure, has scored a major win from Australia's Department of Foreign Affairs and Traded (DFAT)...
Reduce tax cuts to spend on broadband AUSTRALIA must develop a world-class broadband communications system. In a relatively isolated island nation it is critical for international and domestic business and for private use.
Federal Communications...
|
|
02.13.08
A First Look At Grails
By
Sean Corfield
There's still a lot of buzz about Ruby on Rails and I've played around with it but I really don't like the Ruby syntax.
I've tried a few different Rails packages and just find the experience... clunky. Lots of people are very excited about Rails and Ruby in general, especially with JRuby (Ruby for Java) now running Rails. In fact, Maxim Porges thinks JRuby has taken ColdFusion's place as the new web productivity layer for Java, after watching Charles Nutter demo JRuby at the acts_as_conference Rails conference recently in Florida.
Another scripting language that people seem to like is Groovy and there is now a Rails-like framework for Groovy called, unsurprisingly, Grails. Derek Perez likes Groovy and has asked me several times to add support for Groovy to my Scripting for ColdFusion 8 project. Raffaele Castagno, an Italian Groovy fan, even sent me custom tags and instructions for adding it to the project back in August last year but I never got around to it. Then Dave Ross said the other night that he thought Grails was going to do very well for Java developers who don't like Ruby's syntax. Since that was my main objection, I figured it was a good time to actually look at Grails.
The Grails site has a simple installation page with two options: download and install or install from Subversion. The latter sounded like fun for a Sunday afternoon so I checked the code out from codehaus.org and typed ant. 17 minutes later, I had a pristine installation of Grails from the head of SVN. Time to write my first Grails app!
| New Server Offer! Double or Triple - You Pick The Winning Savings Combo - Click here today! |
The Grails site also has a simple Quick Start: grails create-app, grails create-domain-class, grails create-controller. A couple of small edits to the generated code and then fire up Grails and run the app in the browser. It all went very smoothly, exactly as the Quick Start showed.
The first thing that struck me about the running example - after seeing the Rails scaffolding and the Model-Glue scaffolding - is just how pretty the default scaffolding is! Nicely styled output (with CSS), icons for create / edit / delete, a sortable list view (the screencasts on the Grails site were clearly made with an earlier, less sophisticated, version of the scaffolding).
The syntax is definitely cleaner than Ruby (in my opinion) and the structure of the application feels very Java-like and, thus, more familiar to me than the Rails approach. It's probably nice enough that I might actually continue playing with Grails (unlike my experience with Rails).
There are tutorials on integrating Grails with Hibernate and Spring, which will also be more of a match to what I'm used to in ColdFusion (with Transfer and ColdSpring at the heart of all my projects). You can easily create a WAR for deployment of the (compiled) application to a Java app server (technically any Servlet container) so, in theory, you can deploy Grails apps to a JRun instance to run alongside ColdFusion.
Comments
About
the Author:
Sean is currently Senior Computer Scientist and Team Lead in the
Hosted Services group at Adobe Systems Incorporated. He has worked in
the IT industry for nearly twenty-five years, first in database
systems and compilers (serving eight years on the ANSI C++ Standards
Committee), then in mobile telecoms, and finally in web development.
Sean is a staunch advocate of software standards and best practices,
and is a well-known and respected speaker on these subjects. Sean has
championed and contributed to a number of ColdFusion frameworks, and
is a frequent publisher on his blog, http://corfield.org/
|
|