Groovy Training for Java Developers

Groovy Training for Java Developers

Course Length:
Delivery Methods:
Course Topics
  • Understand how dynamic languages differ from languages like Java or C#
  • Work with Groovy closures
  • Use Groovy control structures
  • Build object-oriented programs in Groovy
  • Use Groovy builders to reduce complexity
  • Access databases using Groovy
  • Write unit tests in Groovy
  • Access Java classes from Groovy, and vice versa
  • Build a simple web application using Grails
  • Work with Groovy strings, closures, and collections
  • Develop model-view-controller web applications using Grails
  • Access relational databases from Grails
  • Build unit and functional tests for web applications
  • Groovy support in the Spring framework
  • Build and test RESTful web
Course Overview

This Groovy Training for Java Developers training class teaches experienced Java developers how to write programs in Groovy, both by itself and in conjunction with existing Java code.

Course Outline
  1. Groovy Fundamentals
    1. Differences between Groovy and Java
    2. Compiling and executing Groovy programs
    3. The basic Groovy data types and optional typing
    4. Writing Groovy scripts
    5. Declaring classes
    6. Overriding operators and type coercion
    7. The Groovy JDK: Groovy extensions to the Java standard library
    8. Groovy strings
    9. Regular expressions in Groovy
  2. Object-Oriented Programming In Groovy
    1. Plain Old Groovy Objects (POGOs)
    2. Generated getters/setters
    3. Public vs private defaults
    4. Map-based constructors
    5. @ToString, @EqualsAndHashCode, @TupleConstructor, and @Canonical
  3. Groovy Collections
    1. Ranges
    2. Lists
    3. Maps
    4. Iterators and polymorphic algorithms
  4. Closures in Groovy
    1. Declaring closures
    2. Available options for calling closures
  5. Groovy Control Structures
    1. The "Groovy truth"
    2. Conditional execution
    3. Looping constructs
  6. Miscellaneous Groovy operators
    1. Safe navigation with the ?. operator
    2. The Elvis operator
    3. The spaceship operator
  7. Unit Testing in Groovy
    1. GroovyTestCase
    2. JUnit tests in Groovy
    3. The Spock testing framework
    4. Spock mocks and stubs
  8. Abstract Syntax Tree (AST) Transformations
    1. @Delegate
    2. @Immutable
    3. @Singleton
    4. @TypeChecked and @CompileStatic
    5. The Intercept-Cache-Invoke design pattern
  9. Database Access with Groovy
    1. Basic database operations
    2. DataSet operations
    3. Groovy and ORM solutions
  10. The Spring Framework
    1. Using Groovy beans in Spring applications
    2. "Refreshable" beans
    3. Inline scripted beans
    4. AOP using Groovy
    5. The Groovy BeanBuilder in Spring
  11. RESTful web services
    1. JAX-RS annotations on Groovy classes
    2. JsonSlurper and JsonBuilder
    3. REST clients with the HttpBuilder project
    4. The ratpack framework
    5. REST additions to Grails 2.3+
  12. The Gradle Build Tool
    1. The build challenge
    2. The Gradle plugin system
    3. Defining tasks and dependencies
    4. Using repositories
    5. Multi-project builds
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Groovy class:

  • Working knowledge of Java.
Request a Private Class
  • Private Class for your Team
  • Online or On-location
  • Customizable
  • Expert Instructors
Request Pricing