This course teaches web developers how to use the Grails framework to rapidly create sophisticated web applications. Starting with a foundation of basic Java, students learn the fundamentals of the Groovy programming language. The course then discusses how Grails uses convention over configuration to build applications that rest on the foundation of the Spring Framework and the Hibernate ObjectRelational Mapping API. Applications are built using a standard layered architecture, combining domain classes, controllers, and transactional services. Recent developments in the framework are also covered, including plugins, test driven development, and RESTful web services.
This course uses Grails version 2.5, but the information is applicable for versions 2.3 and 2.4 as well. Corporate & Group Training: Call us at 1-401-783-6172 to help you customize a training plan for your group. Watch our free online training videos with instructor Ken Kousen, Ph.D.: |
“Ken was possibly the best instructor I’ve ever had.” “Ken did a great job, had a thorough understanding and had a lot of patience for helping with anything even if it wasn’t part of the course.” |
Course Features
- Lectures 0
- Quizzes 0
- Duration Lifetime access
- Skill level All levels
- Language English
- Students 100
- Assessments Yes
Training Objectives:
- Develop modelviewcontroller web applications using Grails
- Access relational databases from Grails
- Work with existing Java classes and libraries
- Build unit and functional tests for web applications
Topic Summary
Groovy Review
- Relationship between Groovy and Java
- Operator overloading
- Using assertions
- Strings and Groovy Strings
- POGOs
- Closures
- Ranges, Lists, Sets, and Maps
- Basic AST transformations
- The Groovy JDK
- Miscellaneous operators
- Parsing and building XML
- Parsing and building JSON
Grails Introduction
- Installing Grails
- Grails Links
Starting a Grails project
- Project Structure
- Domain classes
- Controllers
- Services
- i18n
- Views
- Interactive console
- IDE support
Domain Objects
- ObjectRelational Mapping with GORM
- Transient properties
- Constraints and validation
- CRUD operations
Scaffolding
- Dynamic vs static
- Generating controllers
- Generating views
- Tests
Controllers
- Accessing Controllers
- Returning from Controller Actions
- The params map
- Default Action in a Controller
- Parameter binding
- Render, Redirect, Return
- Respond
Grails Object Relational Mapping (GORM)
- Logging SQL
- Optional Hibernatemanaged Properties
- Constraints
- Saving to the Database
The Hibernate Session
- Object-Relational mapping
- Transient, persistent, and detached objects
- The Open Session In View (OSIV) pattern
GORM Relationships
- One-to-Many
- Many-to-Many
- Cascade save and insert
- Cascade delete
- Unidirectional and bidirectional associations
Grails Queries
- Dynamic Finders
- Criteria Queries
- Where Queries
Services
- The need for a service layer
- Grails and the DAO layer
- Grails without transactions
- Grails services
REST
- REST principles
- URL mappings
- Content negotiation
- Hypermedia
- REST in Grails (Grails 2.2 and earlier)
- REST in Grails (Grails 2.3 and above)
Plugin Review and Resources
- Default plugins
- Spring Security
- Google Visualization
- Console
- Survey of popular plugins
- References, online and otherwise