Web Development Using Grails (GRA101)
This Web Development using Grails training class 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.
- 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
- 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
- ObjectRelational mapping
- Transient, persistent, and detached objects
- The Open Session In View (OSIV) pattern
- GORM Relationships
- OnetoMany
- ManytoMany
- 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
Each student will receive a comprehensive set of materials, including course notes and all the class examples.
Experience in the following is required for this Grails class:
- Groovy
- Java EE including servlets, JSPs, and database access