Slide 1

Slide 1 text

COMO VOCÊ NUNCA VIU

Slide 2

Slide 2 text

/DEV/FELIPEMAMUD

Slide 3

Slide 3 text

Disclaimer

Slide 4

Slide 4 text

It's Groovy ● Groovy is object-oriented dynamic language by default, but… … can be optionally typed; … can be static type checking with @TypeChecked; ● dynamic != interpreted; ● static compilation with @CompileStatic; ● Groovy compiles down to JVM bytecode; ● Script vs Classes;

Slide 5

Slide 5 text

A little bit of history 2003 2007 2008 1.0 2011 2012 2.0 2014 2015 2005

Slide 6

Slide 6 text

Compilation phases 1. Initialization (read source files and config compiler) 2. Parsing (text → concrete syntax tree; Antlr2) 3. Conversion (CST → AST) @Grab 4. Semantic Analysis (resolve classes, consistency and grammar) @Lazy @Builder @Field @Log 5. Canonicalization (AST finalize and last chance to use AST) @Delegate @ToString @Immutable 6. Instruction Selection (instruction set for bytecode / type checking) @CompileStatic @TypeChecked 7. Class Generation (create bytecode in memory, AST → bytecode) 8. Output (binary output .class to file system) 9. Finalization (perform cleanup tasks, unused today!)

Slide 7

Slide 7 text

Awesome! ● Optional (Typing, Semicolons, Parentheses, public & return keyword); ● Native syntax constructs (Closures, Lists, Maps, Regex, Ranges) ● Boilerplate mode off; (String, BigDecimal, Null, Truth, Switch) ● Java Interoperability & integration; ● Groovy Development Kit enhancements (GDK); ● DSL easy mode on; ● Builders; ● AST Transformations;

Slide 8

Slide 8 text

Groovy’s nature programming language… as type safe as you want it static type checking as fast as you need static compilation as functional as you make it closures, immutable, etc…

Slide 9

Slide 9 text

Ecosystem

Slide 10

Slide 10 text

References ● Groovy documentation http://groovy-lang.org/documentation.html ● Guillaume Laforge's Blog http://glaforge.appspot.com ● Cédric Champeau's Blog http://melix.github.io/blog ● Groovy in Action, 2nd Edition https://www.manning.com/books/groovy-in-action-second-edition

Slide 11

Slide 11 text

JOIN US! FRIENDSTECHDAY.COM SHARE, LEARN E CONTRIBUTE!

Slide 12

Slide 12 text

Felipe Mamud @ftmamud THANK YOU!