This event has ended!

View current events hosted by ThirstyHead.com

ThirstyHead.com Grails Training - Seattle, WA

Tuesday, May 25, 2010 at 8:00 AM - Thursday, May 27, 2010 at 5:00 PM (PT)

Bellevue, WA

ThirstyHead.com Grails Training - Seattle, WA

Ticket Information

Ticket Type Sales End Price Fee Quantity
Attendee Ended $1,595.00 $0.00

Event Details

Grails is a Java- and Groovy-based web framework that is built for speed. First-time developers are amazed at how quickly you can get a page-centric Model/View/Controller (MVC) web site up and running thanks to the scaffolding and convention over configuration that Grails provides. Advanced web developers are often pleasantly surprised at how easy it is to "shell out" of the framework and get to the Spring and Hibernate underpinnings.

This course will bring you up to speed with Grails in a hands-on, fast-paced, lab-intensive way. No prior web development experience—Java or otherwise—is required.

The course is Mastering Grails for Beginners. It includes the following material:

What is Groovy? What is Grails?

Understanding how Groovy and Grails fit into the Java ecosystem is an important first step. Groovy doesn’t replace Java -- it is meant to complement Java. Grails dramatically speeds up the web development, but you still end up with a Java Enterprise Edition WAR file at the end of the day. We’ll introduce key concepts like scaffolding, convention over configuration, closures, and the power of metaprogramming.

Installing Groovy and Grails

In this section, students will install the Java JDK (if necessary), Groovy, and Grails -- creating an environment variable and adding the projects to the PATH are all it takes. We’ll also discuss language support in popular text editors and Java IDEs.

Creating your first Grails application

Type "grails create-app" and you have taken your first step. In less than 5 minutes, you will have your first Grails application up and running. After that is out of the way, we’ll circle back and explore the basic directory structure of a Grails app and put together our plan of attack for the rest of the class.

Connecting to an external database

The embedded HSQLDB database is a great for prototyping, but most production applications rely on an external database like MySQL, PostgreSQL, Oracle, or DB2. You’ll see how easy it is to migrate to a new database and use different database configurations for development, testing, and production mode.

Understanding Models

Groovy classes (or POGOs -- Plain Old Groovy Objects) are the foundation of Grails. In this section, students will learn how to add fields to a POGO. We’ll also learn how to sort fields, validate fields, customize error messages, and even create a quick one-to-many relationship.

Understanding Controllers

Controllers are the "traffic cop" of a MVC web framework. You’ll learn how to generate controllers and dynamically scaffold them out at runtime. Along the way, you’ll see the metaprogrammed GORM methods added to the POGOs, learn out URLs are resolved, play with the various scopes, and see how parameters are passed back and forth between the web browser and the controller.

Understanding Views

Groovy Server Pages (GSPs) are the default view layer in a Grails application. In this section, you’ll explore the various built-in GSP tags. You’ll also learn about SiteMesh, creating custom TagLibs, creating partial templates, and modifying the default Grails templates.

Querying with GORM

GORM is the Grails Object/Relational Mapper. In reality, it is a thin Groovy facade over Hibernate. Students will explore the basic Create/Retrieve/Update/Delete (CRUD) capabilities of GORM. From there, we’ll see advanced features like Dynamic Finders (book.findByAuthorAndTitle(), book.findAllPagesBetween(), and so on), Hibernate Query Language (HQL), Query By Example (QBE), and more.

Understanding Services

Services are where you place the business logic of your application that isn’t concerned with basic CRUD. In this section, you’ll create a service and call it from a controller.

Adding Ajax

Ajax (Asynchronous Javascript and XML) requests allow you to break out of the coarse-grained, page-centric HTTP request/response cycle. It allows you to update individual fields independently of the rest of the page. We’ll see the native Ajax capabilities of Grails in action, courtesy of Prototype.js and the included GSP tags (including g:formRemote and g:remoteLink).

Returning XML and JSON

Returning HTML is just one of Grails' tricks. It is equally adept at returning XML and JSON (Javascript Object Notation). In this section, you’ll see how easy it is to quickly send back something other than a webpage.

Grails and Legacy Databases

In this last section, we’ll talk about skinning existing databases with Grails. The real power of GORM shines when you see how your class and field names can differ dramatically from the underlying table and column names. You’ll see the static mapping block used in POGOs, as well as Java classes with EJB3 annotations and Hibernate HBM files.