Baeuerle Associates, LLC
 5570 Leeward Ln
 Tilghman, MD 21671

Grails

  For more information use also my Grails Blog.
Documentation

The way, how J2EE application were developed, changed with the
Grails framework. This framework offers J2EE application development beyond Java.  In the year 2007, I was lucky that one of my collegue and developer of CAS Severn, Inc introduced me to the Groovy and Grails Web application development possibilties. This was Grails Version 0.9, which I started my first project.

What is Groovy?
is a language that has a syntax that's similar to, yet simpler than, Java. It's often referred to as a scripting/agile/dynamic language, but I would prefer to stay away from these adjectives as I feel they only end up confusing things. If Java is a wise middle-aged man, Groovy is his teenage son. Groovy has many of the old man's characteristics but is a lot wilder and a lot more fun. Both of them also work together very well.

  • is an agile and dynamic language for the Java Virtual Machine
  • builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
  • makes modern programming features available to Java developers with almost-zero learning curve
  • supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain
  • makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL
  • increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications
  • simplifies testing by supporting unit testing and mocking out-of-the-box
  • seamlessly integrates with all existing Java objects and libraries
  • compiles straight to Java bytecode so you can use it anywhere you can use Java

The following modules and contributions are currently available:

    COM Scripting — script Windows ActiveX and COM components with Groovy
    Gant
    GFreeMarker — an integration of the FreeMarker template engine for Groovy
    GMavenGMaven provides integration of the Groovy language into Maven.
    Google Data Support — makes using the Google Data APIs easier from within Groovy
    Gram — a simple xdoclet-like tool for processing doclet tags or Java 5 annotations
    GraphicsBuilder — GraphicsBuilder is a Groovy builder for Java 2D
    Grapplet
    Griffon — Dekstop Enhancements for Groovy
    Groosh — Provides a shell-like capability for handling external processes.
    Groovy Jabber-RPC — allows you to make XML-RPC calls using the Jabber protocol
    GroovyJMS
    GroovyLab — Provides a domain specific language (DSL) for math engineering (matlab-like syntax).
    Groovy Monkey — is a dynamic scripting tool for the Eclipse Platform
    GroovyRestlet — Groovy DSL for constructing Restlet application
    Groovy SOAP — create a SOAP server and make calls to remote SOAP servers using Groovy
    GroovySWT — a wrapper around SWT, the eclipse Standard Widget Toolkit
    GroovyWS — GroovySOAP replacement that uses CXF and Java5 features
    GSP — means GroovyServer Pages, which is similar to JSP (JavaServer Pages)
    GSQL — supports easier access to databases using Groovy
    JideBuilder — JideBuilder is a Groovy builder for the open source JIDE Common Layer
    Native Launcher — a native program for launching groovy scripts
    Proxy-o-Matic — Proxy-o-Matic lets you create dynamic proxies fast and in an homogeneous way
    Windows NSIS-Installer — a Windows-specific installer for Groovy
    Windows Services — framework for Groovy-based WinNT (Windows) Services
    WingSBuilder — WingsBuilder is a Groovy builder for the wingS Framework
    XMLRPC — allows you to create a local XML-RPC server and/or to make calls on remote XML-RPC servers

What is Grails?
Grails attempts to use the "coding by convention" paradigm of Ruby On Rails to reduce the need for configuration files and other boilerplate code. With "coding by convention," if you have a file whose name itself tells you what the file is doing, you do not need to restate the same thing in a configuration file. The framework will look at the filename and figure things out for itself. Using "coding by convention," Grails will also auto generate a lot of things required in a Web application. Using Grails, you will have a working Web application ready in a short time and with minimal complexity. Grails coding is based on Groovy, but you can also code in Java or better use exisiting Java APi’s and code.

Grails is based on open-source technologies like Spring, Hibernate, and SiteMesh. That's a good thing if you are already good at these technologies but a not so good thing if you dislike these technologies for some reason or think that you have to not only learn Grails but also learn three other frameworks. Although these technologies help Grails perform better, learning four frameworks will seem like too-tough entry barrier to most. The Grails documentation currently highlights its integration with Spring, Hibernate, and other programs, however I think it needs to take the opposite approach and push Grails as a simple and fast Web application development framework. The developer need not worry or care about what happens underneath.

Fortunately, once you get going with Grails, you will see that Grails hides most of the underlying complexity of these frameworks. If you just forget that it's Spring, Hibernate, and more working underneath, things will stay simple.

The three
tiers of a Grails application are:

  • Web tier consisting of the views and controller
  • Business logic tier consisting of domain classes and services
  • Persistence tier consisting of domain classes and data sources

Most frameworks have dozens of features of which very few get widely used. With Grails, the "coding by convention" paradigm and auto-generation of artifacts are these key features.

Other features of Grails are built-in support for Ajax, validations, unit testing, and functional testing. It uses the free and open-source Canoo WebTest project for functional testing of Web applications. Grails also provides integration with the Quartz Scheduler.

 

[Home] [Company] [Services] [Grails] [Grails beyond CRUD] [Links]

For additional questions please eMail to Baeuerle Associates, LLC
©Copyright 2003 Baeuerle Associates, LLC. All rights reserved.