Java Reference
In-Depth Information
• Grails is a complete stack framework (in much the same way as RoR) that com-
bines open source solutions from the view layer to the persistence layer and
everything in between.
• Grailshasan interactive scripting capability thatmakesiteasytorapidlyprototype
applications.
• The design of Grails is based on a plugin system that makes it very easy to ex-
tend. [ 11 ]
11 At latest count, there are over 800 plugins available for Grails (of widely varying quality).
• Grails applications deploy on existing Java-based infrastructure .
Grails relies on the Spring framework for its internal infrastructure, so anything Spring can
do, Grails can do, either directly or through a plugin. Persistence is managed through the
Hibernate Object-Relational Mapping layer, which is powerful enough but can also be re-
placed for the modern family of NoSQL databases.
To show how Grails fits into the standard architecture, I'll walk through the components of
an example.
10.4.1. The quest for the holy Grails
Grailscanbeusedtodesignarbitrarilycomplexwebapplications,butoneofitssweetspots
istoprovideawebinterface onasetofdatabase tables. I'llcome backtothat after showing
the components, because it's both a blessing and a curse.
Grails
The goal of this section is to demonstrate a portion of a small but nontrivial Grails applic-
ation. Chapter 8 examines GORM in more detail. Chapter 9 on REST briefly talks about
REST in Grails. Finally, chapter 7 on Spring talks about the underlying infrastructure.
Consider a web application with four domain classes: Quest , Task , Knight , and
Castle .
 
Search WWH ::




Custom Search