21
Groovy on Android 9 oct 2014

Groovy on Android

  • Upload
    ciklum

  • View
    411

  • Download
    1

Embed Size (px)

DESCRIPTION

Recently Apple has introduced a new language - Swift. Many of us have already had an opportunity to work with it. Without any doubt Swift will be more popular than Objective-C. Unfortunately it is useful for iOS only. Do we have a viable alternative for Android? Yes, and it is called Groovy! During this meet-up Olexandr Leuschenko, cross-platform mobile developer: - tells what Groovy is; - shows the differences between Java, Swift and Groovy code; - talks about development with Groovy for Android in general. The presentation will be interesting for all Android developers.

Citation preview

Page 1: Groovy on Android

Groovy on Android

9 oct 2014

Page 2: Groovy on Android

Agenda

1. What is Groovy?

2. Swift and Groovy

3. Groovy on Android

Page 3: Groovy on Android

Agenda

1. What is Groovy?

2. Swift and Groovy

3. Groovy on Android

Page 4: Groovy on Android

What Apple think

Page 5: Groovy on Android

After Swift release

• Ruby devs: Swift looks like Ruby

• Groovy devs: Swift looks like Groovy

• C# devs: Swift looks like C#

• Java devs: WTH is a closure?

Page 6: Groovy on Android

Groovy• Started in August 2003 (release 1.0 on January 2,

2007)

• Open Source (BSD/Apache licenses)

• Compiled to Java Bytecode

• Grammar similar to Java with inspiration from Python, Ruby and Smalltalk

• Extremely flat learning curve for the Java developers

Page 7: Groovy on Android

Groovy

Java

Page 8: Groovy on Android

Groovy features• Annotations for AST Transformation

(@InheritConstructors, @Singleton, @EqualsAndHashCode)

• Closure

• Metaprogramming (adding method to a class on the fly)

• Native JSON support

Page 9: Groovy on Android

Groovy features

• ?. and *. operators

• Native support for Lists, Maps and Regular Expressions

• String interpolation

• Static and Dynamic typing

Page 10: Groovy on Android

Groovy features

• ?. and *. operators

• Native support for Lists, Maps and Regular Expressions

• String interpolation

• Static and Dynamic typing

Page 11: Groovy on Android

Agenda

1. What is Groovy?

2. Swift and Groovy

3. Groovy on Android

Page 12: Groovy on Android

Groovy and Swift

Page 13: Groovy on Android

Groovy and Swift

Page 14: Groovy on Android

Groovy and Swift

Page 15: Groovy on Android

Groovy and Swift

Page 16: Groovy on Android

Groovy and Swift

Page 17: Groovy on Android

Groovy and Swift

Page 18: Groovy on Android

Groovy and Swift

Page 19: Groovy on Android

Agenda

1. What is Groovy?

2. Swift and Groovy

3. Groovy on Android

Page 20: Groovy on Android

Let’s code!

Page 21: Groovy on Android

Q & A