Never before in my life I had the opportunity to learn a new technology and put it into productive use within just a couple of days. Grails will change is changing the Java and framework landscape right now. Using Grails, within less than 3 weeks, an application has been developed that accepts NFC-scans from mobile devices (i.e. Nokia 6131 NFC), sends notifications by email and by SMS, and renders a live view of scans as well. None of the staff involved had any previous experience with Grails whatsoever (I started implementing the domain classes and services, a colleague of mine then took over to implement the GUI while I was on vacation on the Canary Islands). Our work was targeted towards NetBeans, GlassFish and PostgreSQL.
Listed here are the links that helped us jump on the track to wealth, glory and wisdom
1-2-3
- Download Grails
- Get NetBeans Version >= 6.5 (don’t worry, NetBeans allows more than one version to be installed) NetBeans 6.5 Beta suffers from regression bugs affecting Grails/Groovy/Subversion, e.g. Issue 142724. Use NetBeans 6.5 M1 instead (download, archives, 6.5, milestone,…) Besides that, I experienced drastic problems checking out existing Java projects from subversion, so for now I recommend to stick with NetBeans 6.1 for Java production projects.
- NetBeans Grails Integration Watch out: With NetBeans 6.5 M1+Beta and Windows, don’t use Run from NetBeans, because Jetty won’t stop unless either being killed or you log off. Use grails run-app from command prompt instead (see also Issue 138116)
- Have a look at Groovy: Groovy Beginners Tutorial (don’t skip this)
- optional: Grails Quick Start Tutorial
- Learn Grails: Getting Started with Grails
- Read the books: Beginning Groovy and Grails: From Novice to Professional (by Christopher M. Judd, Jun 2008, my favorite one) and of course The Definitive Guide to Grails (by Graeme Rocher, 2006, available as eBook/PDF, new edition scheduled for Jan 2009)
Links
Pet stores, sort of:
The web service side:
Still more advanced:
Slightly off topic:
Tiddlers:
- Groovy Truth (how Groovy coerces to boolean, a must-read)
- Grails - WebFlow (Spring Web Flow for Grails)
- The Grails Application Generator (Import and export Grails-Domains from/to both databases and UML, Beta)
- Grails Widget list… (set type of widgets within constraints , e.g. description(widget:’textarea’), in case description has no maxSize but should still be rendered within textarea)
- Sh*tmores: Grails + Ext Grid Mini Tutorial
- Grails on Sakila (Marcel Overdijk playing with Grails and YUI, e.g. slick scaffolding templates using YUI)
- Scaffolding with Dojo Grid (and Grails)
- Grails scaffolding - improved list page
- Grails Scaffolding
- Grails & Locales
- OpenID Plugin Very cool! For heavy-weight enterprise apps, use in conjunction with Acegi. Have a look at OpenID user registration on Grails and at http://curious-attempt-bunny.blogspot.com/2008/07/playing-with-grails-openid-integration.html for quick-and-dirty patterns. Get your instant !OpenIDs either from Google or from Verisign Personal Identity Portal(PIP).
- JSecurity Plugin
- Using Groovy to Send Emails - Towards a DSL: Groovy + Ant (html mail) and Grails: Sending email using Ant with GMail SMTP server and Ant Mail Task, send SMTP mail using JavaMail with gmail account (ran into problems on GlassFish when using SSL), Java Tip 115: Secure JavaMail with JSSE
- Grails Mail Plugin (if only I had known this in advance…, note: I’ve not yet confirmed its operation within containers like GlassFish)
- Sending SMTP Authenticated Email, Html content with GroovyTemplates and Spring integration
- Groovy Templates (use them for your own app as well)
- Grails Service, JMS and an MDB and JMS Plugin (e.g. for serving asynchronous requests within an environment that hates new Thread())
- My first Grails plugin (Jetty only, does not work with GlassFish) Plugin adding …/static/resources/ to your Grails project allowing arbitrary resources to be packaged and downloaded, see jettystatic at Google Code
- Enabling HTTP Compression in GlassFish
Deutsche Ecke (German corner, don’t hold your breath yet):
Watch out
Petr Hejl
Few notes on NetBeans:
Issue 138116 is not a problem for grails afaik. On *nix system this should not be problem at all, on Windows this was solved via taskkill. Sou you should be able to easily run & stop application from NetBeans.
That’s good news!
Although it isn’t very hard to do the grails “run-app” from a command prompt either. I ended up with “cls && grails clean && grails run-app”