SlideShare uma empresa Scribd logo
1 de 10
Groovy – An Introduction

Giri Pottepalem
Nov 20, 2013

www.cognitomedia.com
What we will cover today…
 What is Groovy?
 Why Groovy (when we have Java)?
 Installation and Integration with Java
 Tools
 Groovy for Java Eyes
 Resources
 Hands on, code examples etc.
What is Groovy?
 Agile and Dynamic Programming language for Java Platform
(JVM)
 Builds upon the strengths of Java Language
 Better, Lighter Java
 More readable, less verbose, less noisy than Java
 Brings in powerful modern programming features to Java,
inspired by languages like Python, Ruby and Smalltalk
 Backed by VMware
 Taken into core Spring technology stack of latest Spring Eco
System (http://spring.io/platform)
Why Groovy (when we have Java)?
 We are coding in 2013
 Many things around us have changed, but not Java
 Java evolved as a robust and matured platform, but language is still
1990s and started to show it’s age
 Polyglot Programming
 Productive language
 A flat learning curve for Java Developers
 Interoperates with Java seamlessly, compiles to java byte code
 Brings the Joy or Programming back to Java
Installation and Integration
Installation
 http://groovy.codehaus.org/ - Download, unzip
 Set env variable GROOVY_HOME
 Add %GROOVY_HOME%bin to PATH
Integration
 All you need is just one jar file for Java applications (groovy-all.jar)
Tools
 groovysh
 groovyconsole
 IDE plugins (Eclipse, IntelliJ)
Groovy for Java Eyes
 Optional Java features
 Semicolon, parenthesis, obvious scopes, return statement etc.
 Enhanced JDK classes
 GDK Classes
 Native Language support for Collections with consistent syntax like
Java arrays
 Groovy Beans
 Groovy truth
 Exception Handling
 Classes, Scripts, Constructors etc
 Operator overloading
 Convenient operators (?. , *. , ?: , << etc. )
 Annotations (@Log4j, @ToString etc.)
Resources
 http://groovy.codehaus.org/
 http://groovyblogs.org/

Books

….and there are even more
Let’s get some hands on
Let’s get some hands on

Mais conteúdo relacionado

Mais procurados

Mais procurados (8)

A Brief Overview of Kotlin
A Brief Overview of KotlinA Brief Overview of Kotlin
A Brief Overview of Kotlin
 
Spring-batch Groovy y Gradle
Spring-batch Groovy y GradleSpring-batch Groovy y Gradle
Spring-batch Groovy y Gradle
 
JSDT 2.0 Eclipse DemoCamp (Walldorf)
JSDT 2.0 Eclipse DemoCamp (Walldorf)JSDT 2.0 Eclipse DemoCamp (Walldorf)
JSDT 2.0 Eclipse DemoCamp (Walldorf)
 
Go lang
Go langGo lang
Go lang
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Go Lang
Go LangGo Lang
Go Lang
 
really really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfaces
 
Kshitij
KshitijKshitij
Kshitij
 

Semelhante a Groovy introduction

Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?Orest Ivasiv
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvmDmitry Buzdin
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVMelliando dias
 
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!Gr8Conf US 2017 - From Java to Groovy: Adventure Time!
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!Iván López Martín
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programmingbusiness Corporate
 
JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!Iván López Martín
 
Java introduction
Java introductionJava introduction
Java introductionSagar Verma
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with goVimlesh Sharma
 
G W T(2)
G W T(2)G W T(2)
G W T(2)tomcoh
 
Overview of Java
Overview of JavaOverview of Java
Overview of Javajosemachoco
 
CSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptCSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptRashedurRahman18
 
JAVA introduction and basic understanding.pptx
JAVA  introduction and basic understanding.pptxJAVA  introduction and basic understanding.pptx
JAVA introduction and basic understanding.pptxprstsomnath22
 
Griffon - Making Swing Fun Again
Griffon - Making Swing Fun AgainGriffon - Making Swing Fun Again
Griffon - Making Swing Fun AgainDanno Ferrin
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonDevathon
 

Semelhante a Groovy introduction (20)

Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvm
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVM
 
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!Gr8Conf US 2017 - From Java to Groovy: Adventure Time!
Gr8Conf US 2017 - From Java to Groovy: Adventure Time!
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
 
130700548484460000
130700548484460000130700548484460000
130700548484460000
 
JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Java introduction
Java introductionJava introduction
Java introduction
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
 
Groovy And Grails
Groovy And GrailsGroovy And Grails
Groovy And Grails
 
G W T(2)
G W T(2)G W T(2)
G W T(2)
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
 
CSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptCSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.ppt
 
Java Intro
Java IntroJava Intro
Java Intro
 
JAVA introduction and basic understanding.pptx
JAVA  introduction and basic understanding.pptxJAVA  introduction and basic understanding.pptx
JAVA introduction and basic understanding.pptx
 
Griffon - Making Swing Fun Again
Griffon - Making Swing Fun AgainGriffon - Making Swing Fun Again
Griffon - Making Swing Fun Again
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparison
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Groovy introduction

  • 1. Groovy – An Introduction Giri Pottepalem Nov 20, 2013 www.cognitomedia.com
  • 2. What we will cover today…  What is Groovy?  Why Groovy (when we have Java)?  Installation and Integration with Java  Tools  Groovy for Java Eyes  Resources  Hands on, code examples etc.
  • 3. What is Groovy?  Agile and Dynamic Programming language for Java Platform (JVM)  Builds upon the strengths of Java Language  Better, Lighter Java  More readable, less verbose, less noisy than Java  Brings in powerful modern programming features to Java, inspired by languages like Python, Ruby and Smalltalk  Backed by VMware  Taken into core Spring technology stack of latest Spring Eco System (http://spring.io/platform)
  • 4. Why Groovy (when we have Java)?  We are coding in 2013  Many things around us have changed, but not Java  Java evolved as a robust and matured platform, but language is still 1990s and started to show it’s age  Polyglot Programming  Productive language  A flat learning curve for Java Developers  Interoperates with Java seamlessly, compiles to java byte code  Brings the Joy or Programming back to Java
  • 5. Installation and Integration Installation  http://groovy.codehaus.org/ - Download, unzip  Set env variable GROOVY_HOME  Add %GROOVY_HOME%bin to PATH Integration  All you need is just one jar file for Java applications (groovy-all.jar)
  • 6. Tools  groovysh  groovyconsole  IDE plugins (Eclipse, IntelliJ)
  • 7. Groovy for Java Eyes  Optional Java features  Semicolon, parenthesis, obvious scopes, return statement etc.  Enhanced JDK classes  GDK Classes  Native Language support for Collections with consistent syntax like Java arrays  Groovy Beans  Groovy truth  Exception Handling  Classes, Scripts, Constructors etc  Operator overloading  Convenient operators (?. , *. , ?: , << etc. )  Annotations (@Log4j, @ToString etc.)
  • 9. Let’s get some hands on
  • 10. Let’s get some hands on

Notas do Editor

  1. Agility comes from many things in SW development: Tools, Frameworks, Environment. Language needs to be agile as well.
  2. Agility comes from many things in SW development: Tools, Frameworks, Environment. Language needs to be agile as well.