Friday, August 11, 2017

Top 5 Books to Learn Groovy for Java Developers - Best Of Lot, Must Read

Groovy is a programming language which is specially created for Java developers with a view to being a fast paced, scripting companion to Java. It aims to increase the productivity of Java developer by simplifying Java code by removing unnecessary boilerplate. Groovy not only present a succinct and easy to read syntax but also provide a much more elegant and convenient API than Java for common stuff. For example, a Groovy file can do in 50 lines what a Java source code do in 500 lines. You can declare an array as [] and map as [: ] which really make code full of data without much syntax. Because of this property, Groovy is heavily used in unit testing of Java application using a framework like Spock is built on Groovy.
Groovy is also used heavily in build automation and DevOps. The Grails and Gradle framework are built using groovy language. Grails is the framework to develop a web application using Groovy. You'll be amazed at how quickly you can create a real world web application up and run from ground zero.

Grails includes everything you need in a single zip file a web server (Jetty), a database (HSQLDB), Spring, Hibernate, even a Groovy version of Ant called GANT It is more concise, expressive and same time as powerful as Java itself. Most of the Groovy books will cover some Grails and same is true for Grails book, then offer some introduction to the Groovy programming language itself. You can learn more about unit testing and Spock in the book Java Testing with Spock.

If you want to learn more about Gradle, you can refer Gradle in Action. Similarly, if you want to learn more about Grails, I suggest going through Grails in Action, one of the most comprehensive guides of learning Grails for Java developers



5 Groovy Books for Java Developers

Here is my list of some of the best books to learn Groovy for Java developers. The list is ordered based upon my preference i.e. books which I find most suitable for learning Groovy from Java developer point of view.

Making Java Groovy, by Ken Kousen
This is my favorite book on Groovy and I guess the best book to learn Groovy for Java developers. The book is specially designed to show Java developers how to make their lives easier by adding Groovy e.g. how to read a file or how to insert rows into the database without using JDBC.

When I first started Groovy to understand one of the customize build environment, written in Groovy, I needed a book, which can compare Java and Groovy and teach Groovy by leveraging my knowledge in Java, and that's where I found Making Java Groovy an excellent choice.

Best book to learn Groovy for Java Developers


The book is not only full of useful information but also easier to read and I also like Ken's style of leaving humor for footnotes. In short, if you are Java developer and want to learn Groovy in quick time may be to use it for unit testing or build automation, I suggest you to read Making Java Groovy By Ken Kousen first.



Groovy Recipes: Greasing the Wheels of Java
This is another great book on Groovy for busy programmers i.e. those who like to do work rather than read. You will find lots of how to do things in Groovy in this book which is really useful for real world programming and their explanation, which is an excellent way to understand what's going on.

Best book to learn Groovy


I read this book after going through Making Java Groovy and I picked up most of the things given in this book. In short, an excellent book if you are using Groovy for DevOps stuff in your company.

You will immediately start doing stuff in groovy after going through a couple of recipes and their explanation, such is the power of this book. It indeed put wheels on your Java to Groovy journey.



Groovy in Action, Second Edition
This is one of the first and still the best book in Groovy. It is probably the most comprehensive book in Groovy. This first edition was out in 2007, which was one of the first few books on Groovy. The second edition covers Groovy 2.4 and it's thoroughly revised and updated for introducing Groovy to Java programmers.

Book to learn Groovy from scratch


After going through this book you can use Groovy like a pro e.g. including Groovy for building new apps, unit testing, database task, and build automation and DevOps stuff. The best part of the book is that it includes thoughts of some of the core people in Groovy, which is involved in both design and development of Groovy e.g. Dierk Konig, Dr. Paul King, Guillaume Laforge, who is official Groovy Project Manager and Head of Groovy Development, Hamlet D'Arcy, Cedric Champeau who is a core Groovy committer and Erik Pragt.


Programming Groovy 2
The Programming Groovy 2 by Venkat Subramaniam is another great book in Pragmatic Programmers series, which I love. You might know that Venkat is one of my favorite author and presenter, I loved his book on Java 8 and this book also lived up to the expectation.

Groovy book for experienced developers


In short, It is a great book if you want to learn Groovy in deep, the advanced parts of this book are great for building your existing Groovy knowledge.

Books are great for learning a new technology but every programmer is not same, some like training easier than reading books. If you prefer training over book then you can also take a look at Groovy Fundamentals course from Pluralsight, one of the best free course to learn Groovy.


That's all about some of the best books to learn Groovy for Java Developers. If you are also interested on learning Grails, one of the popular build framework and often referred as replacement of Maven then you can check out my post about best book to learn Grails for Java developers. Groovy has become increasingly popular among Java developers due to its concise syntax and powerful API, particularly in DevOps and unit testing space, hence it's a good time to learn Groovy to not only simplify your day-to-day development task but also give your resume a boost by showing your polyglot programming skill.


Other programming and technology books you may like to explore

Thanks for reading this article so far. If you like these books then please share with your friends and colleagues. If you have any question or feedback or any other Groovy book you want to share with us, feel free to do so.

No comments :

Post a Comment