Groovy and Grails Development

Groovy is a popular open-source dynamic language targeting the JVM. Groovy uses a familiar Java-like syntax that will be comfortable for existing Java developers, and provides many features found in other dynamic languages such as Ruby and Python.

Grails is an open-source Web application platform, based on Groovy and built on top of Spring. Grails enables developers to embrace agile methodologies, to deliver high-quality Web applications in rapid time.

This course introduces students to both the Groovy language and the Grails Web development platform, with plenty of hands-on labs to reinforce best practices via a problem-solving approach.

Duration

5 days

 

Prerequisites

  • Solid Java language experience
  • Familiarity with Spring Web would be advantageous but is not a requirement

What you'll learn

  • Understanding the role of Groovy and Grails
  • Writing clean code in Groovy
  • Defining a user interface in Grails
  • Building domains and services in Grails
  • Implementing security
  • Working with web services
  • Reporting and batch processing

Course details

Introduction to Groovy

  • Groovy language features
  • Setting up a Groovy environment
  • Simple Groovy examples
  • Key differences between Java and Groovy

Groovy Essential Syntax

  • Scripts
  • Assertions
  • Strings
  • Methods and closures
  • Operators
  • Arrays
  • Collections
  • Regular expressions

Going Further with Groovy Syntax

  • Domain-Specific Languages
  • Unit testing
  • XML support

Getting Started with Grails

  • Overview of Grails
  • Grails architecture
  • Setting up a Grails environment
  • Scaffolding
  • Controllers and domain classes

Defining a User Interface with Grails

  • Defining the overall look-and-feel
  • Defining actions and views
  • Integration testing
  • Validating user input
  • Defining filters and action interceptors

Building Domains and Services

  • Overview of GORM
  • Creating domain objects
  • Performing validation
  • Database queries
  • Creating and calling a service
  • Injecting services
  • Supporting transactions

Implementing Security in Grails

  • Getting started with authentication and authorization
  • Understanding Grails security concepts
  • JSecurity
  • CAS
  • Spring Security

Using Ajax with Grails

  • Ajax frameworks
  • Uses of Ajax
  • Tag libraries
  • RSS support

Using Web Services

  • Overview of RESTful Web services
  • Implementing RESTful services in Grails
  • Invoking RESTful services from the UI

Reporting

  • Overview of reporting
  • Installing JasperReports and iReports
  • Creating a report
  • Using the Report tag
  • Using ReportController and ReportService

Batch Processing

  • Overview of batch processing
  • Creating a job
  • Building a batch-reporting solution