|
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.
|