The Complete Apache Groovy Developer Course
4.4 (263 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,465 students enrolled
Wishlisted Wishlist

Please confirm that you want to add The Complete Apache Groovy Developer Course to your Wishlist.

Add to Wishlist

The Complete Apache Groovy Developer Course

Learn how to program using Apache Groovy.
4.4 (263 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,465 students enrolled
Created by Dan Vega
Last updated 3/2017
English
Current price: $10 Original price: $95 Discount: 89% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 13.5 hours on-demand video
  • 15 Articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Create Groovy Applications from Scratch
  • Use the Groovy Console
  • Write Groovy Applications in IntelliJ
  • Understand the different features of the Groovy Language
  • Retain Information through quizzes and exercizes
View Curriculum
Requirements
  • Some experience using any programming language
Description

Are you looking to learn a new language? Learning a new language helps expand your skill set as a developer and make you more marketable. If you aren't learning a new language because it's not the one you use at work I think you're missing out on the benefits. I often found that seeing how other languages solve problems makes me a better developer with the languages I use on a day to day basis. I am here to tell you all about an awesome dynamic language called Apache Groovy.

What is Apache Groovy?

Apache Groovy is a powerfuloptionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming.

Who Should Learn Apache Groovy?

I am going to teach you everything you need to know to start using The Groovy Programming language. This course is really designed for 2 different types of people and I think you will both benefit from it. If you’re a beginner programmer with a some experience in another language like Python or Ruby this course is for you. Dynamic languages are generally thought of as easier for total beginners to learn because they’re flexible and fun. If you’re an existing Java Developer (Beginner or Experienced) this course is also for you. You will learn Groovy compliments the Java language and makes some of the complex tasks from Java concise and easy.

Enroll Today

I have spent a lot of time putting together what I think is the most complete course on Groovy around. Please take the time to watch the preview videos and If you like what you see click that enroll button and I will see you inside.

Who is the target audience?
  • Developers of all levels who have some experience in another language
  • Java developers of all levels
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 128 Lectures Collapse All 128 Lectures 13:35:34
+
Introduction
6 Lectures 25:42

Welcome to the complete Apache Groovy Developer Course. My name is Dan Vega and I will be instructor. I have been developing software for over 15 years now and I have a real passion for teaching and helping others. I use Groovy almost every single day and I can honestly tell you that I enjoy working with language and Groovy makes programming fun again.

I want to start off by thanking you for purchasing this course. I spent a lot of time developing what I think is one of the most complete courses on learning Groovy around. In this course we are going to walk through some of the basic fundamentals of the language. After that we are going to cover everything from closures to meta programming, testing, DSLs and so much more. I am taking a very hands on approach in this course. We are going to have a ton of quizzes and exercises to help reinforce the things that we learn in each section. After each exercise we are going to discuss the problem and walk through the solution together.

So I hope you enjoy this journey with me and if you have any questions please don’t hesitate to ask them.

Preview 02:03

In this lecture I want to take a few minutes and explain what Groovy is to those of you brand new to the language. If you’re not new to Groovy I still think you might learn a thing or two so let’s jump on in. Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity. The Groovy language is inspired by languages like Python, Ruby, and Smalltalk, making them available to Java developers using a Java-like syntax.

Preview 05:51

In this lecture we will walk through how to find and download all of the source code for this course. All of the source code for this code is available on Github and broken up into sections to follow along with the course.

Source Code
01:26

In this lecture we will walk through the Groovy Website and look at all of the available resources to us. It is important to know how to find things especially when you are looking for answers. I am going to walk through the website and all of the documentation.

Preview 09:36

I don't know about you guys but I really like to use as many resources that are available to me as I can when I am trying to learn something. I love courses like this one as well YouTube videos, blogs, articles and even good old fashioned books. I want to spend a couple minutes and talk about a few books that have really helped me out. These are not required for the course by any means but I have read them and I think it would be wise to pick one or all of them up.

Groovy in Action (Second Edition)
Making Java Groovy
Programming Groovy 2

At the end of this course I have a section on additional resources. This will contain some links to websites, books, blogs, podcasts, YouTube videos or anything else I think might be of help to you.

Preview 03:49

In this lecture we are going to cover how to get the most out of this course. I have taught a few courses and I have taken a ton of them and I think one of the biggest keys to being successful with them is applying what you learn. To me this means you aren't trying to complete this course in a day. You are spending the time to go through the exercises and quizzes. I would even suggest taking this further if you can. Write your own sample scripts or applications to further understand the code that we are going through in each section. When you get comfortable enough create your scripts and applications and upload the github.

Preview 02:57
+
Getting Started
12 Lectures 01:07:32

In this lecture we are going to talk about what we cover in this section. This section is all about getting started, setting up your development environment and making sure you know how to use the tools you have at your disposal. 

Intro
01:03

In this lecture we are going to install Java on Windows. Remember that Groovy compiles down to Java bytecode so we still need to install the JDK
Installing the Java JDK on Windows
05:34

In this lecture we are going to install Java on Mac OS X. Remember that Groovy compiles down to Java bytecode so we still need to install the JDK
Installing the Java JDK on Mac OSX
03:36

Installing Groovy on Windows
Installing Groovy on Windows
04:44

In this tutorial we are going to install Groovy on Mac OSX by using one of my favorite tools. The Software Development Kit Manager (SDKMAN) is a great tool for managing parallel versions of software. If you are on Mac OSX you can still install Groovy manually but quite honestly I don't know why you would.

SDKMAN
06:30

In this lecture we are going to look at groovsh, the Groovy command like shell.
groovysh
06:05

In this lecture we are going to look at running and compiling groovy programs.
groovyc
07:41

In this lecture we are going to look at the Groovy Console. This program is great for writing small Groovy programs and we will use it throughout the course
Preview 10:30

In this lecture we are going to install IntelliJ and then look at how to create a standard Hello, World project. You can use the community edition for this.

Preview 08:03

In this exercise you will create 3 different Hello World scripts.

[Exercise] 3 ways to Hello Groovy
00:12

So how do you think you did with that exercise? Now that you have had some time to take a look at it I want to go through a quick review and let you know how I would have solved that problem.

[Exercise Review] 3 ways to Hello, Groovy
04:07

In this lecture we are going to look at the differences from a Java class to a Groovy class. If you have never written a single line of code in Java it is still good to see how much less code you use in Groovy. For all of you Java pros out there if this is your first time seeing this it can be an eye opener.
Preview 09:27

Time to review what we learned in this section.

Getting Started With Groovy
5 questions
+
Groovy Basics
16 Lectures 01:37:45
In this section we are to discuss many of the basic concepts of the Groovy language. A few of the lectures will be short and basic introductions but we we will cover some of the topics in later sections of this course.
Intro
01:54

In this lecture we are going to talk through how to use import statements to import packages and classes into your program. 

Imports
04:09

In this lecture we are going to quickly talk about keywords. The Java language defines 50 keywords that are reserved words in your applications. The Groovy language adds an additional 4 bringing us to a grand total of 54 keywords.
Keywords
04:04

In this lecture we will talk about the different options we have for commenting out code. I also want to look at a great blog post that highlights the evolution of a software engineer
Comments
07:15

In this lecture we are going to take a look at assertions. Assertions (by way of the assert keyword) were added in Java 1.4. An assertion is a statement in the Java programming language that enables you to test your assumptions about your program.
Assertions
05:17

In this lecture we are going to talk about scripts. We have already seen the idea of scripts a little bit in this course but we will cover them a little more here.
Preview 02:48

In this lecture we are going to introduce classes. Classes are one of the most fundamental concepts of object oriented programming. We could spend hours talking about the building blocks of OOP but what we are going to talk about now is creating objects and using them.

Preview 09:28

In this lecture you going to create your own class and we are going to have a few rules for you to follow.

[Exercise] Create Your own Class
00:41

In this lecture we are going to review the previous exercise on creating your own class.



[Exercise Review] Create your own Class
12:30

In this lecture we are going to talk about numbers in Groovy. In the next section we will talk more about the different data types in Java and Groovy but for now I want to briefly focus on numbers.
Numbers
03:28

In this lecture we are going to talk about control structures in Groovy. Control structures are a basic feature of any programming language.
Groovy Control Structure
14:14

In this lecture we are going to talk about annotations. You have already seen an annotation in this course and may not have even realized it. In the Java to Groovy demo we showed an example of how we could remove the tostring method and replace it with with a single line above the class. That was the toString annotation.
Annotations & AST Transformations
10:01

AST Transformations are awesome. In this exercise we are going practice using a few.

[Exercise] Using AST Transformations
00:20

In this lecture we are going to review the exercise on AST Transformations.

[Exercise Review] Using AST Transformations
07:30

In this lecture we are going to look at some of the basic operators that you will come across in Groovy.

Operators
07:40

In the last lecture we got a quick introduction to annotations. In this lecture we are going to look at a special annotation you may see throughout this course and in examples you come across on the web. The @Grab annotation is used to define external library dependencies in a script.
Grapes
06:25

We are going to cover what we learned in this section

Learning Groovy Basics
3 questions
+
Simple Data Types
9 Lectures 01:18:57

In this lecture I just want to talk briefly about what we are going to learn in this section.

Data Types Intro
01:46

In this lesson we are going to talk about primitive data types in Java. To understand data types in Groovy we need to understand data types in Java

Java Data Types
13:46

In this lecture we are going to talk more about Groovy data types. In Java every variable needs to be declared with a type and this is one place where Groovy is very different.

Groovy Data Types & Optional Typing
08:36

All about data types

Data Types
7 questions

In this lecture we are going to cover some of scenarios you are going to run into while working with numbers in Groovy.

Working with numbers
12:02

In this lecture we are going to talk about this concept of Operator Overloading. We are going to look through the documentation and see what operator overloading is available to us and walk through some demos. 

Operator Overloading
09:22

In this exercise we are going to learn how to implement operator overloading on our own classes.

[Exercise] Operator Overloading
00:34

In this lecture we are going to review our operator overloading exercise.

[Exercise Review] Operator Overloading
05:56

In this lecture we are going to look at working with Strings in Groovy. There are different ways to create Strings based on our needs and we will cover most of them here.

Strings
09:09

In this lecture we are going to cover the basics of regular expressions. Java has had support for regular expressions (or regex as it's often referred to as) since 1.4. These are a representation of a search pattern used to scan and match for text. While you can use them in Java there are certain situations where the become very complicated. Groovy adds three very helpful methods to the API. In this lecture we are going to cover those, some basics about constructing patterns and a short demo that will bring everything together for us.

Regular Expressions
17:46
+
Collections
6 Lectures 50:25

In the last section we took a look at some basic data types in Java & Groovy. In this section we are going to dive into some complex data types also known as collections. If you have done any Java programming in the past you know that working with collections hasn’t always been easy. In fact Groovy took something complex in Java and made it easy to work with and that is one of the main reasons I took a look at Groovy in the first place. In this section we are going to take a look at ranges which might be new to some developers but they are very useful and easy to work with. We will also look into maps and lists but thanks to some GDK enhancements they also become very easy to work with.

Collections Intro
01:40

In this lecture we are going to take a look at our first complex data type called a Range. Ranges allow us to define a list or "range" of items and move through them. 

Ranges
12:26

In this lecture we look at another data type called a list. Lists allow us to create lists of things and there is an easy to use API for manipulating these lists. 

Lists
16:42

In this lecture we are going to look at the final data type of this section called a Map. A map allows us to create key / value pairs of data.

Maps
10:45

[Exercise] Using Collections
00:44

We are going to review the quiz on using collections.

[Exercise Review] Using Collections
08:08
+
Closures
9 Lectures 01:16:49

We are going to begin our introduction to closures in this section. You can start to do some really cool things with closures and they are a fundamental concept in learning the Groovy programming language. 

Intro
01:51

In this section we are finally going to dive into Closures. You aren’t going to get very far in Groovy before you start running into Closures. They are everywhere and a pretty big part of the language. In fact they are probably the key feature that has made Groovy as popular as it today. That is why this section is extremely important to understand and I hope you will take the time to really understand we go over here.

So what is a closure? A closure is just like a method except that it is a first class citizen of the language. When I have a method in a class we give it a name, it takes some arguments and it performs some actions. A closure will do the same thing but unlike a method a closure is an object and can be used or passed around your program.

What are Closures?
05:44

In this lecture we are going to introduce you to closures. We will walk through how to create them and some of the basic syntax we use to construct closures. 

Creating Closures
09:39

A closure can accept parameters just like a method can. In this lecture we are going to look at all of the different ways a closure can accept parameters. 

Closure Parameters
11:40

This is a quiz about the basics of using closures.

Closure Quiz
5 questions

In this lecture we are going to dive into the documentation and look at some of the different methods we can perform on collections. We are also going to look at how to use a lot of these. These methods should start to make a lot more sense now that we understand how closures work.

Collections Methods
09:10

In Groovy, currying refers to the concept of partial application. Currying in Groovy will let you set the value of one parameter of a closure, and it will return a new closure accepting one less argument.

Curry Methods
08:23

In this lecture we look at what scopes are available to us in a Closure. The delegate of a Closure is an important concept and helps set them apart from lambdas. 

Closure Scope & Delegates
14:13

In this exercise we are going to put what we learned in this section to the test. We have a bunch of exercises that should help us understand how to use closures a little better. 

[Exercise] Using Closures
00:58

In this lecture we are going to review the exercise Using Closures. 

[Exercise Review] Using Closures
15:11
+
Control Structures
7 Lectures 52:45

In this lecture we will talk about our introduction into control structures. 

Intro
01:46

Before we dive into the conditional structures like if, if / else or when we need to understand what the Groovy Truth is. This is because the expressions that are defined in those control structures need to evaluate ot a boolean and there is a fundamental difference how we handle this in Groovy compared to Java.

The Groovy Truth
07:30

Understanding how Groovy evaluates expressions as truth is important. In this quiz we are going to give you a bunch of examples and you need to tell me if it evaluates to true or false. 

The Groovy Truth
3 questions

In this lecture we dive into the conditional structures that you are going to use in Groovy.

  • if
  • if/else
  • if/else if/else
  • ternary / elvis
  • switch
  • in
Conditional Structures
19:10

In this lecture we are going to look at the different looping constructs available to us in Groovy.

Looping
09:12

In this lecture we are going to get our first introduction to exception handling in Groovy. Exception handling in Groovy is pretty similar to Java with one big fundamental change and its a change I LOVE.

Exception Handling
05:40

We are going to have a quick exercise to cover what we learned in this section.

[Exercise] Control Structures
00:41

Did you like this exercise? It was pretty short and sweet but we are starting to write more complete classes and this is really starting to get fun right? 

[Exercise Review] Control Structures
08:46
+
Object Oriented Programming (OOP)
10 Lectures 01:23:36

What is Object Oriented Programming (OOP) and why should I care about it? What are some of the concepts that we are going to cover in this section. Please remember that people have written books on this subject alone so we won't cover everything. This is an introduction to the terms and concepts to make you more familiar with them so you can spot them and use them. 

Intro
01:22

We have talked about classes throughout this course but we really haven't had a chance to dive into the details. In this lecture we talk about how to create a class, declare fields and local variables. 

Classes / Fields / Local Variables
09:27

Now that we have our class created and we know how to created fields it's time to move on to methods. In this lecture we are going to cover how to create and call constructors and methods. 

Constructors & Methods
10:27

In this lecture we are going to use IntelliJ and learn all about packages. When we create classes we need a way to organize them so our classes remain maintainable and packages give us that ability. 

Organizing Classes into Packages
06:57

We are going to review the basic building blocks for creating classes. 

Classes Quiz
5 questions

In this lecture we are going to talk about inheritance. When you have behavior that might be common to many classes we create a class to hold this functionality and extend this "base" class from our other classes. 

Inheritance
09:32

Interfaces
08:36

Traits
10:01

A JavaBean is just a standard

- All properties private (use getters/setters)
- A public no-argument constructor
- Implements Serializable.

    Java provides a mechanism, called object serialization where an object can be represented as a
    sequence of bytes that includes the object's data as well as information about the object's
    type and the types of data stored in the object.

- Create a Java Bean
- Equivalent Groovy Bean
- Look at a Groovy Bean under the hood
- How to use Groovy Beans
- How to write your own getters / setters
- Direct field access

Groovy Beans
14:50

[Exercise] What makes up a class
00:25

[Exercise Review] What makes a class
11:59
+
Runtime MetaProgramming
8 Lectures 01:00:42

Metaprogramming is one of the highlights of Groovy. 

Intro to Runtime Metaprogramming
01:25

The MOP (Meta Object Protocol) is a really big concept to understand when it comes to MetaProgramming. In this lecture we are going to define the MOP and explain what it is and how it is used. 

Meta Object Protocol (MOP)
06:18

Now that we have a little bit of an understanding of what the MOP is it's time to dive in a little further. We are going to learn how to customize the MOP using different hooks. 

Customizing the MOP
18:44

Every single class has an associated MetaClass. The MetaClass contains all of the methods & properties your class contains. Where the dynamic nature of Groovy comes into play is by manipulating that MetaClass and not the concrete class. 

MetaClass
11:16

Just some basic question about what we are learning in this section.

Runtime Metaprogramming
5 questions

Using the metaclass to add dynamic capabilities to our program is usually going to be the way to go. Sometimes we might prefer an alternative method that is a little more confined and not so application wide. In this lesson I want to take a look at this problem and show how categories help us solve it. There are also a few built in categories in the language and we will look at a demo of one today.

Category Classes
07:51

In this lecture we are going to look at a pattern called the Intercept / Cache / Invoke Pattern. This is a pretty solid performance pattern that we should be taking advantage of when we start dealing with missing methods. 

Intercept / Cache / Invoke Pattern
08:32

[Exercise] Runtime Metaprogramming
00:21

We are going to review the Runtime Metaprogramming exercise

[Exercise Review] Runtime Metaprogramming
06:15
+
Compile Time MetaProgramming
13 Lectures 41:53

We are to look at some AST Transformations that allow us to change the code at compile time.

Intro
01:50

A Class annotation is used to assist in the creation of toString() methods in classes. The @ToString annotation instructs the compiler to execute an AST transformation which adds the necessary toString() method.

@ToString
05:19

Class annotation used to assist in creating appropriate equals() and hashCode() methods.

@EqualsAndHashCode
03:54

The @TupleConstructor annotation instructs the compiler to execute an AST transformation which adds the necessary constructor method to your class.

@TupleConstructor
02:03

The @Canonical annotation instructs the compiler to execute an AST transformation which adds positional constructors, equals, hashCode and a pretty print toString to your class. There are additional annotations if you only need some of the functionality: @EqualsAndHashCode@ToString and @TupleConstructor. In addition, you can add one of the other annotations if you need to further customize the behavior of the AST transformation.

@Canonical
02:04

Class annotation to make a singleton class. The singleton is obtained through normal property access using the singleton property (defaults to "instance"). Such classes can be initialized during normal static initialization of the class or lazily (on first access). To make the singleton lazy use @Singleton(lazy=true). Lazy singletons are implemented with double-checked locking and a volatile backing field. By default, no explicit constructors are allowed. To create one or more explicit constructors use @Singleton(strict=false).

@Singleton
02:21

A class annotation used to make a class Comparable by multiple Comparators.

@Sortable
04:53

The @Immutable annotation instructs the compiler to execute an AST transformation which adds the necessary getters, constructors, equals, hashCode and other helper methods that are typically written when creating immutable classes with the defined properties.

@Immutable
02:41

This will let the Groovy compiler use compile time checks in the style of Java.

@TypeChecked
02:59

This will let the Groovy compiler use compile time checks in the style of Java then perform static compilation, thus bypassing the Groovy meta object protocol.

@CompileStatic
03:12

The @Builder AST transformation is used to help write classes that can be created using fluent api calls. The transform supports multiple building strategies to cover a range of cases and there are a number of configuration options to customize the building process. In addition, a number of annotation attributes let you customise the building process. Not all annotation attributes are supported by all strategies. See the individual strategy documentation for more details. If you're an AST hacker, you can also define your own strategy class. The following strategies are bundled with Groovy:

  • SimpleStrategy for creating chained setters
  • ExternalStrategy where you annotate an explicit builder class while leaving some buildee class being built untouched
  • DefaultStrategy which creates a nested helper class for instance creation
  • InitializerStrategy which creates a nested helper class for instance creation which when used with @CompileStatic allows type-safe object creation
@Builder
06:40

We looking at a lot of AST Transformations in this section. Now I want you go through the documentation and find one that we didn't look at and see if you can get it to work on your own.

[Exercise] AST Transformations
00:10

Exercise Review - Find an  AST Transformation that we didn't cover and use it. 

[Exercise Review] AST Transformations
03:47
5 More Sections
About the Instructor
Dan Vega
4.3 Average rating
2,474 Reviews
19,296 Students
4 Courses
Software Engineer

Hi, I’m Dan Vega. I am a Software Engineer living just outside of one of my favorite places in the world, Cleveland, Ohio I am a self-taught programmer who firmly believes that you can accomplish anything in this life if you put your mind to it, roll up your sleeves and are willing to put in the work.

I have been writing software for over 16+ years now and I use my knowledge, passion, and influence to help other developers achieve their goals. I teach online and currently, have over 16,000 students.

When I am not writing software I have a number of things that really keep me busy. I love to read books, listen to podcasts and watch online courses. I have a real thirst for knowledge and it consumes me every single day of the week. I also love to run & lift heavy weights which keep me balanced throughout the week.