Home » JVM Languages » Groovy

Groovy

Grails Hello World Example

1. Introduction This example is about creating the first application in grails and we basically start application or any introduction with a Hello example. So this Hello World program in Grails will be the introduction for starting Grails application. Let’s start with Grails at first. Grails is a web application framework for JAVA platform. Also Grails is highly productive framework ...

Read More »

Grails REST Example

In this example we shall show you how to create RESTful APIs using Grails. Exposing your application functionality to other applications is always achieved using web services. Grails provides several features that make implementing a RESTful web service in Grails easy using a RESTful resource. Originally, web services grew in popularity as a means for system integration. But with the recent popularity ...

Read More »

Groovy Script Tutorial for Beginners

In this article we will see how easy it is to write scripting in Groovy, with a practical example that serves a common use case. As you would probably know, Groovy is a JVM Language which is defined to run on top of Java Virtual Machine. Having said that it borrows all Java’s capabilities alongside providing its own extra features ...

Read More »

Groovy Dictionary Example

In this article we will see how to have a Dictionary in Groovy. Groovy does not have a built in dictionary like Python language. However we can use the Map data structure for manipulating a Dictionary. To understand this article, the reader should have a better understanding of how Map works in Groovy. You can read this Groovy-Map-Example for the ...

Read More »

Groovy Json Example

In this article we will see how to manipulate JSON data in Groovy. JSON (JavaScript Object Notation) is the much preferred data format these days for the exchange of data between the interested parties (client and server), due to its light weight nature and ease of use. Groovy has a built in support to work with JSON data – be ...

Read More »

Grails on Groovy Tutorial

Grails is a web development framework integrated with JVM that lets developers to develop applications by using built-in features like integrated ORM, DSL (Domain Specific Languages), runtime and compile time meta programming, and concurrent programming. In this tutorial, I will show you how to develop Grails application step by step with extra theoretical informations about Grails. Table Of Contents 1. ...

Read More »

Groovy String Example

1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String manipulation in an easy way. In other words, it is very easy to split, add, manipulate, initialize, escape Strings in Groovy. In this tutorial I will show you how to use Groovy String efficiently. 2. Warmup Let’s ...

Read More »

Groovy Closure Example

1. Introduction A closure is an anonymous code block that can take arguments, return value, and also can be assigned to a variable. When it comes to Groovy, a closure can contain a variable scope defined outside of the closure expression. Groovy offers extended features to formal closure definition. By using this features, we can write our code more dynamically ...

Read More »

Groovy Regex Example

1. Introduction Regular Expression is a character sequence defines search pattern especially for pattern matching with strings. You may see Regular Expression as Regex or Regexp in software world. In this tutorial, I will show you how to use regex operations in Groovy by using pretty easy methods. 2. Quick Start In Groovy, you can define a pattern by using ...

Read More »

Groovy Collect Example

1. Introduction Groovy collect() is used for iterate through collections to apply closure to each element. In this tutorial, we will see how to use collect() for collection operations. Let’s get started 2. Collect When you have a look at the method signatures of collect below, we will see that collect can be executed with default closure which is Closure.IDENTITY, ...

Read More »