Your SlideShare is downloading. ×
0
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

eXo EC - Groovy Programming Language

1,423

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,423
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. Groovy Programing Language <ul><li>Why this topic? </li><ul><li>Agile web development with Grails
  2. Apply better practice to our groovy templates </li></ul><li>After this topic? </li><ul><li>Web development with Grails
  3. Develop Grails with Flex and deploy on Google App Engine or Spring Source Cloud </li></ul></ul>
  4. Groovy Programming Language <ul><li>What is Groovy?
  5. Let's play with Groovy
  6. Some basic differences from Java
  7. Some new operators
  8. Anything in Java but not in Groovy
  9. Expert Groovy
  10. Best practices </li></ul>
  11. What is Groovy? <ul><li>In 1995, Java changed the world
  12. Now Java bloats with too many frameworks, libs... -> many organizations have to consider Ruby, LAMP, .NET for more productive and agile at lower costs
  13. Groovy appeared in 2003 – promising more complete and dynamic language for JVM instead of Ruby, Python, or JavaScript implementation for JVM. </li></ul>
  14. Let's play with Groovy <ul><li>Our famous “Hello World” in Java
  15. Switch “Hello World” Java to Groovy </li></ul>
  16. Differences from Java <ul><li>Fewer imports: </li><ul><li>java.io
  17. java.math
  18. java.net
  19. java.util
  20. groovy.lang
  21. groovy.util </li></ul></ul>
  22. Differences from Java <ul><li>The truth
  23. Java: if (mySet == null || mySet.isEmpty()) {
  24. ...
  25. }
  26. Groovy:
  27. if (!mySet) {
  28. ...
  29. } </li></ul>
  30. New Operators <ul><li>?. (NULL-SAFE OBJECT NAVIGATION)
  31. ?: (ELVIS!)
  32. *. (THE SPREAD-DOT OPERATOR)
  33. <=> (COMPARISONS WITH A SPACESHIP)
  34. ${} (GROOVY STRINGS)
  35. [] (ARRAY-STYLE NOTATION FOR LISTS AND MAPS) </li></ul>
  36. <ul>In Java but not in Groovy </ul><ul><li>Java “FOR” loop
  37. No “DO...WHILE”
  38. Inner and anonymous classes: Not fully supported </li></ul>
  39. <ul>Expert Groovy </ul><ul><li>Closures : single-method anonymous classes
  40. [ &quot;apple&quot;, &quot;pear&quot;, &quot;cherry&quot; ].each { println it }
  41. Duck Typing : Applied to dynamic languages, it means that if an object has a particular property or method signature, then it doesn’t matter what type the object is, you can still call that method or access that property. This is only possible in dynamic languages because properties and methods are resolved at runtime. </li></ul>
  42. Best Practices <ul><li>Use idiomatic Groovy
  43. Experiment
  44. Use methods where appropriate
  45. Use explicit types in method signatures </li></ul>

×