SlideShare a Scribd company logo
1 of 34
Why every
Java developer
should know
Groovy language
Victor Trakhtenberg
victortr75@gmail.com @victortr75
Personal
My name is Victor
Personal
Java.IL community co-founder
http://www.meetup.com/JavaIL/
Groovy is very easy to enter
into for Java developers,
since…
Java code is Groovy code
Groovy Features
• Strings
• Collections
• Date
• Parsing and producing
JSON
• Working with a DB
• Processing XML
• Template engines
• Builders
• Grapes
• Traits
• Processing
configuration
• HTTPBuilder
• and many more…
Groovy is more than just
a set of features,
it is more than a better
Java
There are new concepts for
Java developers
• Dynamic language
• with optional static-typing and static-
compilation
• Closures
• Functional programming
• Meta-programming
• Traits
• DSLs
• and more…
Prelude - REPL
Groovy Collections
Map with default
Using Groovy in a running Java
project
Our setup: Java Play! Framework project
Choose one concern to use Groovy
Our choice: JSON manipulations
Parse JSON
Build JSON
Case Study: Campaign Configuration
Management
The Java interface and
the Groovy implementation
Java-to-Groovy Bridge
Is it a ‘coupon’ campaign
Is it a ‘coupon’ campaign
Is it a ‘coupon’ campaign
Integrate with Salesforce
Update account at Salesforce
Integrate with Salesforce - Authenticate
Use Groovy for non-production
http://jaxenter.com/groovy-is-the-swift-alternative-for-android-107846.html
Groovy resources
• http://groovy-lang.org/
• http://glaforge.appspot.com/category/Groovy%20Weekly
• http://www.mrhaki.com/
• https://plus.google.com/communities/105160926044623621768
• http://www.mscharhag.com/2015/02/creating-android-apps-with-
groovy.html
• http://groovy.codehaus.org/modules/http-builder/doc/uribuilder.html
• http://www.drdobbs.com/jvm/why-build-your-java-projects-with-
gradle/240168608?pgno=3
• http://www.infoq.com/presentations/groovy-test-java-spock
• http://www.infoq.com/presentations/testing-spock-geb
• http://melix.github.io/blog/2015/02/who-is-groovy.html
• http://groovy-the-superb-homeless.mally.pl/#/
• https://github.com/victorgit/GroovyPresentation
MrHaki – Groovy Goodness
http://mrhaki.blogspot.co.il/2009/09/groovy-goodness-padding-strings.html
Images sources
• http://www.clevercuties.com/myimages/products/Computers/IHEARTPROGRAMMING.jpg
• http://blogs.perceptionsystem.com/wp-content/uploads/2013/12/Happy-Customer.jpg
• http://lifepalette.com/wp-content/uploads/2015/01/Productivity.jpg
• http://www.checkaction.com/blog/wp-content/uploads/2014/01/startup-employee-productivity-tips-675x320.jpg
• http://www.akifarslan.com.tr/wp-content/uploads/2013/10/java.jpg
• http://cdn.makeuseof.com/wp-content/uploads/2012/03/jvm.png?84ec63
• http://cdn.slidesharecdn.com/ss_thumbnails/ecosystem-120717081103-phpapp01-thumbnail-4.jpg?cb=1342530724
• http://www.army-armee.forces.gc.ca/assets/ARMY_Internet/images/ceremonial-guard/index-main.jpg
• http://www.local-guru.net/img/guru/have_fun.png
• http://blog.xo.com/wp-content/uploads/2014/03/pic-raised-hands-550x300.png
• https://pbs.twimg.com/media/BVDKBfUCIAAWKw9.jpg
• http://www.nscsd.org/webpages/jenkondrk/imageGallery/Clip%20art/raise%20hand.gif
• http://ubik.cc/MAOW-Firenze-09/images/repl-loop.png
• http://hirportal.sikerado.hu/images/kep/201110/belyeg.jpg
• http://www.slideshare.net/SpringCentral/groovy-in-thelightofjava8
• http://blog.cacoethes.co.uk/groovyandgrails/groovy-in-light-of-java-8
• http://www.infoq.com/articles/groovy-to-Java-8
• https://tedvinke.wordpress.com/2014/06/20/java-8-lambdas-vs-groovy-closures-compactness-grouping-and-summing/
• http://groovy.mn/static/hh97hMrFEv8Xc9j1zvR9winGH86xmHGbiZNKFTORWYl.jpg

More Related Content

What's hot

Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices Matthew Gerring
 
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...Jacek Laskowski
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvmDmitry Buzdin
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming LanguageAdler Hsieh
 
JavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptJavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptAswin Barath
 
Generating Perfect API Code with quicktype.io by Mark Probst
Generating Perfect API Code with quicktype.io by Mark ProbstGenerating Perfect API Code with quicktype.io by Mark Probst
Generating Perfect API Code with quicktype.io by Mark ProbstPostman
 
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
 
We b development trends
We b  development  trendsWe b  development  trends
We b development trendsRajib Ahmed
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotionKamil Lelonek
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forgefirenze-gtug
 
Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”Ashrith Kulai
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecGiulio De Donato
 
Ultimate guide on how to hire full stack web developer in 2022
Ultimate guide on how to hire full stack web developer in 2022Ultimate guide on how to hire full stack web developer in 2022
Ultimate guide on how to hire full stack web developer in 2022Katy Slemon
 

What's hot (20)

Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices
 
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...
Developing modular applications with Java EE 6 and Enterprise OSGi + WebSpher...
 
Bdd and Behat
Bdd and BehatBdd and Behat
Bdd and Behat
 
CollegeDiveIn presentation
CollegeDiveIn presentationCollegeDiveIn presentation
CollegeDiveIn presentation
 
Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvm
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming Language
 
JavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptJavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScript
 
Generating Perfect API Code with quicktype.io by Mark Probst
Generating Perfect API Code with quicktype.io by Mark ProbstGenerating Perfect API Code with quicktype.io by Mark Probst
Generating Perfect API Code with quicktype.io by Mark Probst
 
Scala vs ruby
Scala vs rubyScala vs ruby
Scala vs ruby
 
DevOps Toolchain v1.0
DevOps Toolchain v1.0DevOps Toolchain v1.0
DevOps Toolchain v1.0
 
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
 
We b development trends
We b  development  trendsWe b  development  trends
We b development trends
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Crystal
CrystalCrystal
Crystal
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forge
 
Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”
 
Rajat kumar
Rajat kumarRajat kumar
Rajat kumar
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
Ultimate guide on how to hire full stack web developer in 2022
Ultimate guide on how to hire full stack web developer in 2022Ultimate guide on how to hire full stack web developer in 2022
Ultimate guide on how to hire full stack web developer in 2022
 

Similar to WeCode IL: Confessions of a java developer that fell in love with the groovy language

DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)Alvaro Sanchez-Mariscal
 
淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)Kyle Lin
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finessemzgubin
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonDomingo Suarez Torres
 
DevQA: make your testers happier with Groovy, Spock and Geb
DevQA: make your testers happier with Groovy, Spock and GebDevQA: make your testers happier with Groovy, Spock and Geb
DevQA: make your testers happier with Groovy, Spock and GebAlvaro Sanchez-Mariscal
 
Java Edge.2009.Grails.Web.Dev.Made.Easy
Java Edge.2009.Grails.Web.Dev.Made.EasyJava Edge.2009.Grails.Web.Dev.Made.Easy
Java Edge.2009.Grails.Web.Dev.Made.Easyroialdaag
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
 
Introduction to Grails 2013
Introduction to Grails 2013Introduction to Grails 2013
Introduction to Grails 2013Gavin Hogan
 
Java training in bangalore
Java training in bangaloreJava training in bangalore
Java training in bangalorezasi besant
 
Dsl로 만나는 groovy
Dsl로 만나는 groovyDsl로 만나는 groovy
Dsl로 만나는 groovySeeyoung Chang
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should AboutBJIT Ltd
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)Oursky
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the EnterpriseJames Williams
 
Javascript Apps at Build Artifacts
Javascript Apps at Build ArtifactsJavascript Apps at Build Artifacts
Javascript Apps at Build ArtifactsClay Smith
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Provectus
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesStrannik_2013
 
Java Script from Browser to Server
Java Script from Browser to ServerJava Script from Browser to Server
Java Script from Browser to ServerWSO2
 

Similar to WeCode IL: Confessions of a java developer that fell in love with the groovy language (20)

DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
One-stop solution for Grails web app development
One-stop solution for Grails web app developmentOne-stop solution for Grails web app development
One-stop solution for Grails web app development
 
淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
Groovy Finesse
Groovy FinesseGroovy Finesse
Groovy Finesse
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparison
 
DevQA: make your testers happier with Groovy, Spock and Geb
DevQA: make your testers happier with Groovy, Spock and GebDevQA: make your testers happier with Groovy, Spock and Geb
DevQA: make your testers happier with Groovy, Spock and Geb
 
Java Edge.2009.Grails.Web.Dev.Made.Easy
Java Edge.2009.Grails.Web.Dev.Made.EasyJava Edge.2009.Grails.Web.Dev.Made.Easy
Java Edge.2009.Grails.Web.Dev.Made.Easy
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
Introduction to Grails 2013
Introduction to Grails 2013Introduction to Grails 2013
Introduction to Grails 2013
 
Java training in bangalore
Java training in bangaloreJava training in bangalore
Java training in bangalore
 
Dsl로 만나는 groovy
Dsl로 만나는 groovyDsl로 만나는 groovy
Dsl로 만나는 groovy
 
Html5
Html5Html5
Html5
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
 
Javascript Apps at Build Artifacts
Javascript Apps at Build ArtifactsJavascript Apps at Build Artifacts
Javascript Apps at Build Artifacts
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
 
Java Script from Browser to Server
Java Script from Browser to ServerJava Script from Browser to Server
Java Script from Browser to Server
 

WeCode IL: Confessions of a java developer that fell in love with the groovy language

  • 1. Why every Java developer should know Groovy language Victor Trakhtenberg victortr75@gmail.com @victortr75
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Groovy is very easy to enter into for Java developers, since… Java code is Groovy code
  • 9. Groovy Features • Strings • Collections • Date • Parsing and producing JSON • Working with a DB • Processing XML • Template engines • Builders • Grapes • Traits • Processing configuration • HTTPBuilder • and many more…
  • 10. Groovy is more than just a set of features, it is more than a better Java
  • 11. There are new concepts for Java developers • Dynamic language • with optional static-typing and static- compilation • Closures • Functional programming • Meta-programming • Traits • DSLs • and more…
  • 12.
  • 15.
  • 17.
  • 18. Using Groovy in a running Java project Our setup: Java Play! Framework project Choose one concern to use Groovy Our choice: JSON manipulations
  • 21. Case Study: Campaign Configuration Management
  • 22. The Java interface and the Groovy implementation
  • 24. Is it a ‘coupon’ campaign
  • 25. Is it a ‘coupon’ campaign
  • 26. Is it a ‘coupon’ campaign
  • 28. Update account at Salesforce
  • 29. Integrate with Salesforce - Authenticate
  • 30. Use Groovy for non-production
  • 32. Groovy resources • http://groovy-lang.org/ • http://glaforge.appspot.com/category/Groovy%20Weekly • http://www.mrhaki.com/ • https://plus.google.com/communities/105160926044623621768 • http://www.mscharhag.com/2015/02/creating-android-apps-with- groovy.html • http://groovy.codehaus.org/modules/http-builder/doc/uribuilder.html • http://www.drdobbs.com/jvm/why-build-your-java-projects-with- gradle/240168608?pgno=3 • http://www.infoq.com/presentations/groovy-test-java-spock • http://www.infoq.com/presentations/testing-spock-geb • http://melix.github.io/blog/2015/02/who-is-groovy.html • http://groovy-the-superb-homeless.mally.pl/#/ • https://github.com/victorgit/GroovyPresentation
  • 33. MrHaki – Groovy Goodness http://mrhaki.blogspot.co.il/2009/09/groovy-goodness-padding-strings.html
  • 34. Images sources • http://www.clevercuties.com/myimages/products/Computers/IHEARTPROGRAMMING.jpg • http://blogs.perceptionsystem.com/wp-content/uploads/2013/12/Happy-Customer.jpg • http://lifepalette.com/wp-content/uploads/2015/01/Productivity.jpg • http://www.checkaction.com/blog/wp-content/uploads/2014/01/startup-employee-productivity-tips-675x320.jpg • http://www.akifarslan.com.tr/wp-content/uploads/2013/10/java.jpg • http://cdn.makeuseof.com/wp-content/uploads/2012/03/jvm.png?84ec63 • http://cdn.slidesharecdn.com/ss_thumbnails/ecosystem-120717081103-phpapp01-thumbnail-4.jpg?cb=1342530724 • http://www.army-armee.forces.gc.ca/assets/ARMY_Internet/images/ceremonial-guard/index-main.jpg • http://www.local-guru.net/img/guru/have_fun.png • http://blog.xo.com/wp-content/uploads/2014/03/pic-raised-hands-550x300.png • https://pbs.twimg.com/media/BVDKBfUCIAAWKw9.jpg • http://www.nscsd.org/webpages/jenkondrk/imageGallery/Clip%20art/raise%20hand.gif • http://ubik.cc/MAOW-Firenze-09/images/repl-loop.png • http://hirportal.sikerado.hu/images/kep/201110/belyeg.jpg • http://www.slideshare.net/SpringCentral/groovy-in-thelightofjava8 • http://blog.cacoethes.co.uk/groovyandgrails/groovy-in-light-of-java-8 • http://www.infoq.com/articles/groovy-to-Java-8 • https://tedvinke.wordpress.com/2014/06/20/java-8-lambdas-vs-groovy-closures-compactness-grouping-and-summing/ • http://groovy.mn/static/hh97hMrFEv8Xc9j1zvR9winGH86xmHGbiZNKFTORWYl.jpg

Editor's Notes

  1. שלום לכולם. כמה מילים על עצמי. קוראים לי ויקטור.
  2. אני אחד המארגנים של קהילת Java.IL יחד עם אסף, אורי, חיים ותומר אנחנו מארגנים meetups וכנסים בנושאים הקשורים ל Java JVM ושפות תיכנות JVM אנחנו פועלים כחצי שנה, יש כבר קרוב ל 650 נרשמים. אני רוצה לנצל את ההזדמנות הזאת כדי להזמין אותכם להירשם, להשתתף במיטאפים: גם לשמוע וגם לדבר, ולהיות פעילים בקהילה.
  3. אני אוהב לתכנת. אחת הסיבות המרכזיות היא שאני אוהב לראות שמשתמשים במה שאני יוצר, אני אוהב שלקוחות אוהבים להשתמש במוצרים שאני יוצר. לכן חשוב לי להשתמש בכלים שעוזרים לי להיות פרודוקטיבי, כלים שעוזרים לי לגרום לדברים לקרות. שפת תיכנות היא אחד הכלים האלה.
  4. בואו נראה איך Java בתחום הזה. ה runtime של Java ה JVM הוא מערכת יציבה שקיימת כבר 20 שנה, מאד נדיר להיתקל בבאג כאן. אפשר לבנות מערכות שהן robust and scalable - תורם הרבה לפרודקטיביות. ל Java יש ecosystem מאד עשיר, כמעט כל בעיה שאתם נתקלים אפשר למצוא תשובה או לשאול…- תורם הרבה לפרודקטיביות.
  5. אבל מה לגבי שפה עצמה? כאן זה כבר פחות תורם לפרודוקטיביות. אני מפתח Java 15 שנה, אני אוהב Java, אבל ב Java צריך לכתוב הרבה boilerplate code וזה עוצר אותך, זה לא נותן להתקדם וזה ממש לא כיף. לא הרגשתם Java עוצרת אותכם? הלוואי ו Java היתה דינאמית יותר, קלילה יותר ומגניבה יותר כמו שפות אחרות אולי. לא כיף לפתח עם Java.
  6. לפני כשנתיים וחצי פגשתי את Groovy. Groovy היא שפת תיכנות מבוססת על  Java, היא רצה מעל JVM, ולכן נהנת מכל הדברים הטובים שלה. היות ואפשר להשתמש בקוד Java בתוך קוד של Groovy אפשר להנות מה ecosystem של Java, אבל Groovy מוסיפה ecosystem נוסף, ecosystem חם ומקבל מפתחים חדשים. Groovy היא שפה דינאמית וקלילה בעזרת Groovy אפשר להיות הרבה יותר פרודוקטיבי וגם להנות מהפיתוח.
  7. ויש הרבה features מעניינים. אני לא הולך לפרט כאן את features, יש הרבה חומר ברשת. אני אגע בקצרה בכמה בהמשך.
  8. אבל Groovy היא יותר מאוסף של features, היא יותר מ Java משופרת, Groovy חושפת את מפתחי Java ל concepts חדשים, דרכים נוספות לפתח תוכנה, וגם פותחת דרכים ללמוד שפות נוספות. אני יכול להעיד על עצמי שמאז שאני מפתח גם ב groovy אני מפתח טוב יותר גם ב Java. וגם לומד ומפתח ב scala.
  9. משתמשים ב Groovy בהרבה אירגונים גדולים ומפורסמים וקטנים. אני משתתף הרבה במיטאפים וכנסים בארץ, אני מארגן חלק מהם ואני שומע מעט מאד על Groovy. זה לא המצב בעולם, בכנסים מובילים בעולם מדברים הרבה על Groovy יש הרבה פרויקטים עם Groovy. אני חושב שהמצב בארץ לא מוצדק חבל שזה כך ואני רוצה לשנות את זה. אני חושב שיש ל Groovy יתרון על פני שפות JVM אחרות שגם הן נהנות מה runtime הזה. יש כמה שפות מצויינות אבל ל Groovy  קל מאד להיכנס בניגוד לשפות אחרות. לכן אני חושב שכל מפתח Java חייב לדעת Groovy: זה יכול להיות שימושי בהרבה מאד מקרים, זה מכניס כיף לפיתוח. אני אראה לכם כמה דוגמאות כאלה בהמשך.
  10. לפני שאני נוגע ב Groovy עצמו אני רוצה להראות לכם כלי מאד שימושי שמגיע עם Groovy, זהו כלי שאפשר להשתמש בו גם כשמפתחים Java. מפתחי Ruby,Python,Scala,Javascript שבינכם מכירים את המושג REPL: זוהי אותה סביבה command line בהרבה מקרים, שמאפשרת לכתוב פקודות בשפה מסויימת ומייד לראות תוצאה. זה מאד שימושי, תורם הרבה לזרימה בזמן הפיתוח. כמה נחמד לרשום קוד Javascript ב Chrome dev tool ופשוט מייד לראות תוצאה. ב Java אין משהו כזה, ואני חושב שזאת נכות של  Java. אבל עכשיו בזכות ה groovy shell יש את זה גם ב Java!! אני אראה לכם. אני קיבלתי ממקור חיצוני URL אבל הוא היה escaped חיפשתי באינטרנט ומצאתי שיש API של apache commons lang שמאפשר לעשות unescape בדרך כלל ב Java צריך לייצר איזשהו main או unit test no more!!!! אפשר לעשות את זה גם מ IDE הנה כך ב intellij
  11. אחד הדברים הראשונים שאני למדתי לאהוב ב Groovy הן Groovy collections הן מתבססות על Java collections אבל מוסיפות כל כך הרבה יכולות! הנה כך מאתחלים רשימה שהיא בעצם ה ArrayList של Java קל מאד לקחת רשימה ולהפוך אותה לרשימה אחרת
  12. איך מאתחלים map עם ערכים התחלתיים וערך default שורה אחת ב Groovy וכך עושים את זה ב  Java
  13. ב Commerce Sciences אנחנו מפתחים מוצר שה front end שלו היא single page application המפותח מעל Ember וה- backend אפליקציית Java מעל Play! Framework. אנחנו מנהלים campaigns של לקוחות. campaign הוא בעצם json שנשמר ב DB. חלקים מה json הזה נשלחים ל front end בפורמט ש ember מצפה לקבל. יש הרבה התעסקות עם json. אנחנו מצאנו את עצמנו מתאמצים המון לעשות את זה ב Java. ב Groovy זה כל כך פשוט, תיכף תיראו.
  14. הסיפר שלנו הוא בעצם דוגמה לשימוש ב Groovy באפלירציית Java קיימת. אנחנו התחלנו עם בעיה אחת: מניפולציות json.