SlideShare a Scribd company logo
1 of 17
Download to read offline
Why Don't you Groovy?
Engineering Communities
05 May 2016
Orest Ivasiv
Software engineer, Softserve
Audience
Java developers
No experience in Groovy
Disclaimer
We will not talk about Groovy language in details
It's not a tutorial
We are not Groovy haters/lovers. We are pragmatic devs
Groovy is not a panacea, Groovy is a hammer
Hipsters are not Groovy (it's 2016)
Problems and Tasks
Java devs should not write scripts in Java
Bash, Python, Ruby, etc.
How to re-use existence Java knowledge in automation tasks
How to choose the right scripting language
How to automate on Windows, Linux and OSX
Why Java is bad for scripting and automation?
Tedious File and Network processing
Tedious collection processing
Tedious XML/JSON processing
Verbose type declaration
Limited DSL support
Painful object construction code
Just too verbose for small tasks
Slow Edit-Compile-Run loop
Scripts vs Tools
Scripts
Run on all major OSs
Easy to distribute
Easy to read and maintain
Reasonably small
Quick Edit-Run cycle
Performance is not important
E.g.
- Bash, Ruby, Python, Node.js, Groovy
- Tcl, Lua
Tools
No sources
"Fat" binary
Popular or/and minimal runtime
No runtime - single binary
Very easy to distribute
Low maintenance cost
E.g.
- Java/JVM, Go
- C/C++, Python, Node.js
Groovy
JVM language
Java, Scala, Clojure, Groovy, Kotlin
Superb interoperability with Java
Syntax is very similar to Java
All Java libraries can be used in Groovy
Almost all Java code is Groovy code
Groovy language is full of modern features
DSL
Groovy is compiled Language
Groovy is a dynamic language
Dynamic != interpreted
Interpreted == a runtime interprets an AST
Groovy compiles down to JVM bytecode
Language features
Language features
List
Map
GString
GDK
MOP
Builders
Groovy Samples
Launching a Jetty server to serve Groovy templates
@Grapes([
@Grab(group='org.eclipse.jetty.aggregate', module='jetty-server', version='8.1.7.v20120910'),
@Grab(group='org.eclipse.jetty.aggregate', module='jetty-servlet', version='8.1.7.v20120910'),
@Grab(group='javax.servlet', module='javax.servlet-api', version='3.0.1')])
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.servlet.*
import groovy.servlet.*
def runServer(duration) {
def server = new Server(8080)
def context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
context.resourceBase = "."
context.addServlet(TemplateServlet, "*.gsp")
server.start()
sleep duration
server.stop()
}
runServer(10000)
What's ugly in Groovy
JVM and Groovy script start time is slow
Limited OS-level scripting (see Python, Ruby)
Groovy is another language. It’s not Java (thanks cap)
Groovy is not well accepted in other communities
Not convenient to use Groovy without IDE
References
Who is Groovy? by Cédric Champeau – history and people behind Groovy language
(http://melix.github.io/blog/2015/02/who-is-groovy.html)
Blog about Groovy, Gradle and Grails(http://mrhaki.blogspot.com)
http://groovy-lang.org/(http://groovy-lang.org/)
Groovy on the Shell(https://www.youtube.com/watch?v=1ogwSsl6EGQ)
Curated list of awesome groovy libraries, frameworks and resourcesy(https://github.com/kdabir/awesome-
groovy)
Thank you
05 May 2016
Tags: groovy(#ZgotmplZ)
Orest Ivasiv
Software engineer, Softserve
@halyph(http://twitter.com/halyph)

More Related Content

What's hot

Dsl로 만나는 groovy
Dsl로 만나는 groovyDsl로 만나는 groovy
Dsl로 만나는 groovySeeyoung Chang
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Develcz
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDevelcz
 
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoNode.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoAziz Ali
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming LanguageAdler Hsieh
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlinphpfriendsclub
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаphpfriendsclub
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to GoOliver N
 
JavaScript Tools and Implementation
JavaScript Tools and ImplementationJavaScript Tools and Implementation
JavaScript Tools and ImplementationCharles Russell
 
Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?Koombea
 
How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)yamanekko
 
My talk on Piter Py 2016
My talk on Piter Py 2016My talk on Piter Py 2016
My talk on Piter Py 2016Alex Chistyakov
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotionKamil Lelonek
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Why and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsWhy and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsBrainhub
 

What's hot (20)

Crystal
CrystalCrystal
Crystal
 
Dsl로 만나는 groovy
Dsl로 만나는 groovyDsl로 만나는 groovy
Dsl로 만나는 groovy
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
 
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoNode.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming Language
 
Go lang
Go langGo lang
Go lang
 
From NodeJS to Rust
From NodeJS to RustFrom NodeJS to Rust
From NodeJS to Rust
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlin
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробника
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to Go
 
JavaScript Tools and Implementation
JavaScript Tools and ImplementationJavaScript Tools and Implementation
JavaScript Tools and Implementation
 
Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?
 
How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)
 
Mono Repo
Mono RepoMono Repo
Mono Repo
 
My talk on Piter Py 2016
My talk on Piter Py 2016My talk on Piter Py 2016
My talk on Piter Py 2016
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
 
Why and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsWhy and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.js
 

Similar to Why don't you Groovy?

Groovy introduction
Groovy introductionGroovy introduction
Groovy introductiongpottepalem
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVMelliando dias
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBrian Sam-Bodden
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvmDmitry Buzdin
 
Gluecon 2014 - Bringing Node.js to the JVM
Gluecon 2014 - Bringing Node.js to the JVMGluecon 2014 - Bringing Node.js to the JVM
Gluecon 2014 - Bringing Node.js to the JVMJeremy Whitlock
 
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
 
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
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonDevathon
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with RubyAnis Ahmad
 
G W T(2)
G W T(2)G W T(2)
G W T(2)tomcoh
 
Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginnerscalltutors
 
Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)smancke
 

Similar to Why don't you Groovy? (20)

Groovy introduction
Groovy introductionGroovy introduction
Groovy introduction
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVM
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvm
 
Gluecon 2014 - Bringing Node.js to the JVM
Gluecon 2014 - Bringing Node.js to the JVMGluecon 2014 - Bringing Node.js to the JVM
Gluecon 2014 - Bringing Node.js to the JVM
 
Practical JRuby
Practical JRubyPractical JRuby
Practical JRuby
 
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!
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
 
Groovy And Grails
Groovy And GrailsGroovy And Grails
Groovy And Grails
 
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!
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparison
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
 
G W T(2)
G W T(2)G W T(2)
G W T(2)
 
Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginners
 
Groovy
GroovyGroovy
Groovy
 
Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)
 

More from Orest Ivasiv

Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environmentOrest Ivasiv
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
 
Dockerizing development workflow
Dockerizing development workflowDockerizing development workflow
Dockerizing development workflowOrest Ivasiv
 
Adventures of java developer in ruby world
Adventures of java developer in ruby worldAdventures of java developer in ruby world
Adventures of java developer in ruby worldOrest Ivasiv
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality ToolsOrest Ivasiv
 
Time Management: the Hidden Power of Pomodoro
Time Management: the Hidden Power of PomodoroTime Management: the Hidden Power of Pomodoro
Time Management: the Hidden Power of PomodoroOrest Ivasiv
 

More from Orest Ivasiv (8)

Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Dockerizing development workflow
Dockerizing development workflowDockerizing development workflow
Dockerizing development workflow
 
When Camel Smiles
When Camel SmilesWhen Camel Smiles
When Camel Smiles
 
Adventures of java developer in ruby world
Adventures of java developer in ruby worldAdventures of java developer in ruby world
Adventures of java developer in ruby world
 
Math synonyms
Math synonymsMath synonyms
Math synonyms
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
Time Management: the Hidden Power of Pomodoro
Time Management: the Hidden Power of PomodoroTime Management: the Hidden Power of Pomodoro
Time Management: the Hidden Power of Pomodoro
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Why don't you Groovy?

  • 1. Why Don't you Groovy? Engineering Communities 05 May 2016 Orest Ivasiv Software engineer, Softserve
  • 3. Disclaimer We will not talk about Groovy language in details It's not a tutorial We are not Groovy haters/lovers. We are pragmatic devs Groovy is not a panacea, Groovy is a hammer Hipsters are not Groovy (it's 2016)
  • 4. Problems and Tasks Java devs should not write scripts in Java Bash, Python, Ruby, etc. How to re-use existence Java knowledge in automation tasks How to choose the right scripting language How to automate on Windows, Linux and OSX
  • 5. Why Java is bad for scripting and automation? Tedious File and Network processing Tedious collection processing Tedious XML/JSON processing Verbose type declaration Limited DSL support Painful object construction code Just too verbose for small tasks Slow Edit-Compile-Run loop
  • 7. Scripts Run on all major OSs Easy to distribute Easy to read and maintain Reasonably small Quick Edit-Run cycle Performance is not important E.g. - Bash, Ruby, Python, Node.js, Groovy - Tcl, Lua
  • 8. Tools No sources "Fat" binary Popular or/and minimal runtime No runtime - single binary Very easy to distribute Low maintenance cost E.g. - Java/JVM, Go - C/C++, Python, Node.js
  • 9. Groovy JVM language Java, Scala, Clojure, Groovy, Kotlin Superb interoperability with Java Syntax is very similar to Java All Java libraries can be used in Groovy Almost all Java code is Groovy code Groovy language is full of modern features DSL
  • 10. Groovy is compiled Language Groovy is a dynamic language Dynamic != interpreted Interpreted == a runtime interprets an AST Groovy compiles down to JVM bytecode
  • 14. Launching a Jetty server to serve Groovy templates @Grapes([ @Grab(group='org.eclipse.jetty.aggregate', module='jetty-server', version='8.1.7.v20120910'), @Grab(group='org.eclipse.jetty.aggregate', module='jetty-servlet', version='8.1.7.v20120910'), @Grab(group='javax.servlet', module='javax.servlet-api', version='3.0.1')]) import org.eclipse.jetty.server.Server import org.eclipse.jetty.servlet.* import groovy.servlet.* def runServer(duration) { def server = new Server(8080) def context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS); context.resourceBase = "." context.addServlet(TemplateServlet, "*.gsp") server.start() sleep duration server.stop() } runServer(10000)
  • 15. What's ugly in Groovy JVM and Groovy script start time is slow Limited OS-level scripting (see Python, Ruby) Groovy is another language. It’s not Java (thanks cap) Groovy is not well accepted in other communities Not convenient to use Groovy without IDE
  • 16. References Who is Groovy? by Cédric Champeau – history and people behind Groovy language (http://melix.github.io/blog/2015/02/who-is-groovy.html) Blog about Groovy, Gradle and Grails(http://mrhaki.blogspot.com) http://groovy-lang.org/(http://groovy-lang.org/) Groovy on the Shell(https://www.youtube.com/watch?v=1ogwSsl6EGQ) Curated list of awesome groovy libraries, frameworks and resourcesy(https://github.com/kdabir/awesome- groovy)
  • 17. Thank you 05 May 2016 Tags: groovy(#ZgotmplZ) Orest Ivasiv Software engineer, Softserve @halyph(http://twitter.com/halyph)