
Install groovy on your system, create simple projects in the ID, and explore the groovy console to run groovy code snippets quickly.
Create a Groovy project in IntelliJ IDEA, enable Groovy framework support, write a hello world class, and debug with breakpoints on the JVM to see Groovy syntax and interpolation.
Learn how to install Groovy on Mac or Linux with sdkman. Install sdkman, configure your shell profile, list Groovy versions, and set a default version.
Explore the Groovy installation, including the bin tools like Groovy, Groovy Console, and Groovy Doc, plus offline documentation and dependency management with grippe.
Explore the Groovy console to run code snippets, inspect the abstract syntax tree, and see how a tiny Groovy class automatically generates private properties with public getters and setters.
explore the most important Groovy operators and learn what they do and how they work, demonstrating how Groovy's unique operators streamline development.
Explore the null-safe dereference operator in Groovy, enabling safe navigation through object graphs and reducing boilerplate null checks when accessing nested properties for Java developers.
Explore the Elvis operator to elegantly provide a default value for a variable, such as a logged-in user’s name or guest, in Groovy.
Learn how the spaceship operator in Groovy enables on demand sorting with a custom comparator. Order objects by name or cost using a closure, avoiding hardcoded natural ordering.
Master the Groovy spread operator to explode a collection into its elements, inserting them in place or invoking methods on each item with star syntax.
Explore the range operator in Groovy, creating inclusive and exclusive ranges for numbers and enumerations, and discover object and big decimal ranges with practical examples.
Master how to work with strings in Groovy by using string interpolation and regular expressions to format strings and extract the information you need.
Explore how Groovy handles strings, contrasting regular strings with interpolated strings. Use double quotes and placeholders with $variable and optional curly braces to interpolate values, producing g-strings.
Explore how Groovy supports multi-line strings using heredocs, enabling templates, markup, and SQL queries with string interpolation via the G-string, avoiding tedious concatenation.
Groovy exposes the pattern, find, and match operators, invoked via the tilde, to build and apply regular expressions using java.util.Pattern to match strings.
Explore how Groovy favors slashy regular expressions over string-based patterns, avoiding escaping pitfalls and enabling concise matching of whitespace, digits, and character classes.
Learn how to use Groovy's find operator with regular expressions to test matches inline, creating a pattern on the fly or in a single expression for concise regex evaluation.
Discover the groovy match operator, with the pattern and find operators, to test inputs against regular expressions and return booleans.
Explore capture groups in Groovy regular expressions to extract the day of the week from a string, using parentheses, match results, and the pattern find and match operators.
Explore how Groovy treats collection classes as first-class citizens and makes working with collections easier for Java developers.
Explore Groovy collections by creating lists with square brackets and converting to linked lists or sets through type coercion, while preserving insertion order with linked hash set.
Create maps with concise Groovy syntax, using linked hash maps to preserve insertion order, and adopt map literals as first-class collection constructs in Groovy.
Explore composing collections of different types by building a map where each entry maps to a list, such as fruits and vegetables with apple, banana, orange and potato, green beans.
Create and access elements in standard collections of lists, sets, and maps using collection syntax; retrieve elements by index and range with zero-based indexing.
Learn how Groovy truthiness evaluates collections to a boolean, using shortcuts to check for elements or null, and understand how Groovy coercion simplifies collection handling.
Explore maps and lists in Groovy, using keys to access entries and indices to retrieve elements, and appreciate Groovy's concise, readable syntax for composite collections.
Learn to iterate groovy collections with the each method and closures, using the default it or a named element, and understand concurrent modification prevents modifying the list during iteration.
Explore accessing elements by index with each with index for lists and sets, and see how the default Groovy set type returns a linked hash set that preserves insertion order.
Groovy processes maps with square bracket syntax, iterating with each to access key and value, while preserving insertion order via a linked hash map.
Learn to filter groovy collections with closures, using find and findAll to extract odd numbers and filter objects by criteria, leveraging the it variable for concise expressions.
Use find to return the first matching element in a collection, or findAll to return all matches, then access a name with dot syntax to trigger the getter.
Explore groovy collection testing with every and any, plus find all and find, to filter and verify conditions across elements in maps of person objects.
Collect elements by applying a closure to each element via Groovy's collect, using it as the current element, to double numbers, uppercase names, or map to person objects.
Use collectEntries to build a map by specifying keys and values in the closure. Create a map where edges serve as keys and names as values, producing an inverted mapping.
Explore Groovy's standout language features and its compact syntax that lets you write less code. Learn simple conventions to avoid traps and responsibly harness Groovy's features.
Understand groovy's default imports, auto-including java.lang and common collections. See how numbers map to BigDecimal and BigInteger, and how a G suffix creates BigInteger alongside java.util collections.
Explore how Groovy applications start with a public static void main method, using Groovy console scripts, and how weak typing and script simplifications influence main method behavior.
Discover how to define classes and create instances in Groovy, mirroring Java syntax with a lighter touch. Learn when to add public static void main string args for executable scripts.
Groovy lets you add methods and state to classes, use optional semicolons, and define constructors with flexible typing via def, mirroring Java but with dynamic, ruby-like typing.
Explore inheritance in Groovy by extending a person class with an employee subclass, calling a super constructor, and using Groovy's optional parentheses for single-parameter print statements.
Override methods in Groovy to customize behavior in a superclass and subclass, leverage super constructors, and blend Java compatibility with Groovy idioms.
Discover how groovy properties replace private fields with package-private declarations, with automatic getters and setters. Compare pogo with pojo, see how AST transformations streamline class creation and leverage Java knowledge.
Groovy's operator overloading maps operators to methods invoked behind the scenes, demonstrated by overloading plus and using a greeting wrapper to produce uppercase results with less boilerplate.
Discover how Groovy handles string equality using the == operator, contrasting it with Java's equals and reference comparison, and learn why you can compare strings directly.
Learn how Groovy returns multiple values from a method using a list, replacing Java’s boilerplate classes with lightweight weak-typed syntax, as shown with box dimensions x, y, z.
Explore groovy ast transformations that auto generate equals, hashCode, and toString for pojos, using the Greevey console to reduce boilerplate and enable clear state printing.
Groovy named constructors let you instantiate objects by naming arguments instead of positional parameters, while emphasizing keeping a complete state and sound design.
Master Groovy fundamentals and boost developer productivity by using Groovy for quick scripts and pipeline tasks, empowering Java developers with a standout skill.
Welcome to the wonderful world of Groovy!
In this course, we take you step-by-step through the most common features and programming idioms of the Groovy programming language enabling you to supercharge your developer productivity by harnessing the power of Groovy's lightweight and succinct programming syntax!
We'll explore Groovy's lightweight and powerful syntax which slashes development time down to at most a quarter of the time you'd spend in writing the equivalent Java program!
As a Java developer of over 20 years programming in the main investment banks of the world, I'm proficient in Java for sure. But in spite of the skill level I have in Java, Groovy is still my number one go-to language when it comes to knocking up quick scripts to automate drudge work and even for writing full scale applications too (using other frameworks such as Grails and Griffon).
Groovy is predominantly seen today in Jenkins pipelines scripts and in Gradle build scripts, but this really underplays its power and versatility as we'll see in this course. You're gonna excited by it's features and start using it in your day to day developer activities once you take this course!
In particular, you'll learn the following:
Getting set up with Groovy, installing it and creating Groovy projects in the IDE
Exploring the Groovy toolset
Using Groovy Console to execute Groovy code
Common Groovy operators which form the cornerstone of it's powerful syntax
Strings, heredocs and using regular expressions and capture groups to parse and extract strings
Groovy collections and the enhancements delivered by the GDK (Groovy Development Kit)
Iterating collections
Searching through collections
Filtering and transforming collections in Groovy with Groovy's powerful closure mechanism
and much much more!
I can't wait to see you inside and share my passion for Groovy with you - so enrol today and let's get started! ;)