Description
Course info
Rating
(289)
Level
Intermediate
Updated
Jan 28, 2014
Duration
3h 37m
Description

This course will introduce you to not only the Groovy language, but also the underlying Groovy platform. Throughout this course we'll develop a Groovy application that can parse GPS data from an XML file, insert it into a database, and even correlate this data to forecast data retrieved from a REST API. At the end of this course you'll not only have a working knowledge of the Groovy language, but you'll also be able to use Groovy in a multitude of everyday use cases.

About the author
About the author

Jeremy Jarrell is an agile coach and author who helps teams get better at doing what they love. He is heavily involved in the technology community, both as a highly rated speaker throughout the United States.

More from the author
Groovy: Getting Started
Beginner
1h 18m
Nov 8, 2018
Empowering Your Team with ICAgile
Intermediate
2h 4m
Aug 14, 2018
Achieving an Agile Mindset with ICAgile
Beginner
1h 50m
Jul 20, 2018
More courses by Jeremy Jarrell
Section Introduction Transcripts
Section Introduction Transcripts

Working with XML
My name is Jeremy Jarrell and welcome to Working with XML, part of the Groovy Fundamentals course series. Before we dive into how to work with XML data using the Groovy language, I'd like to take a moment to introduce the project that we'll be working with through the remainder of this course. We'll be booting an application that takes existing GPS data and combines that with historical forecast data. This would give us the opportunity to learn how Groovy works with XML files as we consume the GPS data from a known XML format. We'll also get the opportunity to work with a REST service using Groovy's REST client and understand how Groovy's dynamic nature makes it easy to work with the JSON data that comes from that service. Finally, we'll store the data in relational database where it can be more easily queried at a later date. Along the way this will give us the option to interact with native Java libraries so we can understand why even though we're working with a new language, Groovy doesn't ask us to walk away from the investment and the APIs that we're already familiar with. We'll also learn how Groovy's dependency management scheme works and understand how we can bring third-party dependencies into our class path. Finally, given that we're working with a rich, dynamic language, we'll explore unit testing in Groovy and understand how Groovy's built-in unit testing capabilities give us the opportunity to nail down the behavior of our application.

Digging Deeper with Groovy Syntax
My name is Jeremy Jarrell, and welcome to Digging Deeper with Groovy Syntax, part of the Groovy Fundamentals course series. One of the advantages of having our code under unit tests is that it provides a great safety net over which we can refactor and improve our code without having to worry about breaking its core functionality. The Groovy language is heavily influenced by its Java roots and so far we've stuck fairly close to those roots in an attempt to ease the transition from the Java language. However, now that we have a nice safety net in place, we're going to branch out a bit and really take advantage of some of the more advanced features that Groovy brings to the table.

Working with REST Services
My name is Jeremy Jarrell and welcome to Working with REST Services, part of the Groovy Fundamentals course series. In our previous modules, we've parsed the GPS data from a given XML file and displayed this information to the screen. While being able to parse and display this information is valuable, it would also be nice to be able to see the historical weather data corresponding to each point of the GPS track. For example, if we'd like to correlate things such as derived speeds, to external factors such as weather. Luckily, there are a multitude of web services that exist, which provide such historical forecast information. One very popular web service is the Forecast API. Forecast was created by the developers of the popular iOS app, Dark Sky and services the same underlying historical forecast information that Dark Sky uses to the broader developer community. Now the Forecast API is a paid API, but it does allow up to 1000 calls per day for free, which makes it more than adequate for our purposes. The Forecast API is a very simple API and provides current forecast data based on a latitude or longitude point pair, or it also will provide historical forecast data based on a combination of latitude, longitude, and time stamp. It is this later call that we'll use with the information we have in the GPX file to retrieve the corresponding forecast data based on the latitude, longitude and time stamp found in each route point. Now the Forecast API is a REST-based web service; however, Groovy has excellent support available for working with REST services. In particular the Groovy RESTClient provides excellent encapsulation over HTTP requests and response objects. Also, dynamic languages such as Groovy are extremely well suited to working with the flexible data formats such as JSON or XML that we often receive from today's web services.