Syllabus of Master Groovy Online Training
Module 1: Installation and Introduction to Groovy
- Installing sdkman
- Installing groovy development kit using sdkman
- Understanding the various tools like groovyc, groovy shell and groovy console
- Writing very basic commands on the groovy shell
- How groovy compares to other JVM languages like Java
Module 2: Variables & Operators
- Defining variables using the ‘def’ keyword
- Dynamic typing
- Explicitly defining data types for a variable
- Arithmetic, relational, logical operators
- Elvis and spaceship operators in groovy
Module 3: Functions
- Defining functions in groovy
- Function with implicit and explicit returns
- Default arguments in functions
- Closures
- Functional programming in groovy
- Functions that take groovy map as argument
Module 4: Branching & Looping
- ‘if’ , ‘if-else if-else’ selection statements for branching
- The groovy ‘switch’ statement to achieve branching
- Looping using ‘while’ and ‘for’
- ‘break’ and ‘continue’ statements
Module 5: Object Oriented Programming
- Classes and objects
- Difference between instance variables and static variables.
- Instance and static functions
- Constructors
- Groovy bean class
- On demand encapsulation of object attributes in groovy
- Operator overloading in groovy classes
- Composition
- Inheritance
- Abstract classes
- Interfaces
- Traits
- Organizing groovy code in packages
- Default packages imported in groovy code
Module 6: Collections
- Using the List data type of groovy
- Functional programming on list data structure using groovy closures
- Meta programming on list data structure
- Map data structure in groovy and various operations on a map
Module 7: Exceptation Handling
- Flow of a program in the event of an exception thrown in the program
- Exception handling using try-catch
- Defining custom exceptions and throwing them
- The finally block
- How groovy exception handling is different from java exception handling
Module 8: Metaprogramming
- Meta Object protocol (MOP)
- MetaClass
- Adding dynamic methods to build in groovy classes at run time
- Adding dynamic methods in custom groovy classes at run time
Module 9: Builders
- Introduction to the builder pattern
- Designing domain specific language (DSL) to initialize objects in groovy
- JSON builder
- Object graph builder
- Other builders available in the groovy programming language
Module 10: Applications of Groovy
- Build GUIs using SwingBuilder in groovy
- Build multi screen gui’s
- Connect gui’s to a database using groovy sql package
- Introduction to gradle
- Writing custom gradle scripts in groovy for automating build tasks