Post on 09-May-2015
description
Groovy & Grails Jean Barmash
CTO, EnergyScoreCards www.meetup.com/grails
Java: String[] names = new String[] {"Rod", "Carlos", "Chris"}
for (String it : names) if (it.length() <= 4) System.out.println(it);
Groovy: String[] names = [ "Rod", "Carlos", "Chris" ]
for (String it : names) if (it.length() <= 4) System.out.println(it);
Idiomatic Groovy: names = ["Rod", "Carlos", "Chris"]
names.grep { it.size() <= 4 }.each{ println it }
Groovy Language
Dynamic Language for the JVM Native Integration with Java, cross-compilation Almost-zero learning curve can rename .java to .groovy Backed by VMWare / SpringSource Open Source, Apache License Unfortunate Name
Major Features
Less Ceremony Closures Native collection syntax / processing Many Features for DSL Abstract Syntax Tree Transformation
E.g. @Immutable, @Singleton Trivial XML / HTML / JSON Processing Fun Did I say easy integration with Java?
Grails (www.grails.org)
High Productivity Web Framework Convention over configuration Built on solid Java technologies
Spring, Hibernate, Quartz GORM - Works with Hibernate, JPA, and NoSQL Dbs Plugins - 699 plugins & growing (including clojure, scala) IDE Support 2.0 In November Backed by SpringSource / VMWare Awesome Community Unfortunate Name
Who Uses Groovy / Grails Netflix (Internally) Sky.com LinkedIn Conde Naste (Wired) Example - clickOnero in Latin America
1.5 million users, 80k concurrent users, 8 tomcats, 5 Linux boxes, 1 mysql, 1 terracotta, 1 rabbitmq
EnergyScoreCards :-)
Other Groovy Projects
Spock Testing Framework GEB Functional Testing Framework GPARS - Concurrency Framework Gradle - convention over configuration build framework Griffon - Swing Framework Some Other projects that offer Groovy support
o Spring, Mule, NanoContainer, ServiceMix, Magnolia CMS, eXo, neo4j, Jenkins,
o Many more at http://groovy.codehaus.org/Related+Projects
References
Groovy Home Page http://groovy.codehaus.org/ Related Projects http://groovy.codehaus.org/Related+Projects Blogs - http://groovyblogs.org/ Groovy Magazine - http://www.groovymag.com Grails - www.grails.org Grails Plugins - http://grails.org/plugin/category/all SpringSource - www.springsource.com Groovy / Grails Support
http://www.springsource.com/support/groovyandgrailssupport Conferences - Gr8Conf, SpringOne2GX SpringOne2GX - http://www.springone2gx.com/ Gr8Conf - http://www.gr8conf.org/ NYC Groovy/Grails Meetup - http://www.meetup.com/grails/