confessions of a java developer that fell in love with the groovy language
TRANSCRIPT
Confessions of a Java developer
that fell in love with the Groovy language
Victor Trakhtenberg
[email protected] @victortr75
It is NOT an introduction to Groovy
It is NOT “why you should not use Java”
It is NOT “why you must use
Groovy”
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…
There are new concepts for Java developers
• Dynamic language• with optional static-typing and static-
compilation• Closures• Functional programming• Meta-programming• Mixins• DSLs • and more…
Using Groovy in a running Java project
Our setup: Java Play! Framework project
Choose one concern to use Groovy
Our choice: JSON manipulations
Challenges
• IDE support
– Browsing Java code – Groovy code
• Long stack traces
– challenging debugging
• Coding conventions
Groovy in light of Java8
• There is still a gap between Java 8 and Groovy
• There is a synergy between Groovy and Java 8
http://www.slideshare.net/SpringCentral/groovy-in-thelightofjava8http://www.javacodegeeks.com/2014/06/java-8-lambdas-vs-groovy-closures-compactness-grouping-and-summing.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/#/• http://www.eweek.com/developer/groovy-language-proposed-as-
apache-incubator-project.html• https://github.com/victorgit/GroovyPresentation
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.pivotal.io/pivotal/news-2/groovy-2-4-and-grails-3-0-to-be-last-major-releases-under-pivotal-
sponsorship• http://therealdanvega.com/blog/2015/01/20/pivotal-drops-groovy-grails-sponsorship• http://grails.io/post/108534902333/the-future-of-groovy-grails-sponsorship• http://groovy.mn/static/hh97hMrFEv8Xc9j1zvR9winGH86xmHGbiZNKFTORWYl.jpg