Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introducción a Groovy

2,443 views

Published on

Presentación para el #Gulev2KX en Veracruz

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Introducción a Groovy

  1. 1. Groovy: el lenguaje dinámico para la JVM José Juan R. Zuñiga (@neodevelop) @grailsmx
  2. 2. Agenda • Introducción abierta(Open Source y lenguajes de desarrollo) • ¿Que es groovy? • Hola Mundo en Groovy • Azúcar Sintáctica • +Groovy en una mirada • Aplicaciones Desktop con Groovy • Acceso a base de datos con Groovy • Metaprogramación • Testing
  3. 3. Introducción
  4. 4. Groovy
  5. 5. HolaMundo en Java public class HolaMundo { private String nombre; public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String saluda() { return "Hola " + this.nombre + " !!!"; } public static void main(String[] args) { HolaMundo objeto = new HolaMundo(); objeto.setNombre("@grailsmx"); System.out.println(objeto.saluda()); } }
  6. 6. HolaMundo en Groovy public class HolaMundo { private String nombre; public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String saluda() { return "Hola " + this.nombre + " !!!"; } public static void main(String[] args) { HolaMundo objeto = new HolaMundo(); objeto.setNombre("@grailsmx"); System.out.println(objeto.saluda()); } }
  7. 7. Mejor a la manera Groovy class HolaMundo { String nombre def saluda() { "Hola ${this.nombre} !!!" } } def objeto = new HolaMundo(nombre:"@grailsmx") println(objeto.saluda())
  8. 8. ¿Cómo llegamos a esto…? • Tener el JDK instalado • Establecer la variable JAVA_HOME y agregarla al PATH en el subdirectorio /bin • Descargamos la distribución de Groovy en http:// groovy.codehaus.org/ • Creamos una variable de entorno GROOVY_HOME apuntando al directorio donde se descomprimió la distribución • Adicionalmente, incluir en el PATH el directorio / bin de la variable de entorno GROOVY_HOME, es decir: %GROOVY_HOME%/bin • Let’s rock the code!!!
  9. 9. + Groovy en una mirada • Totalmente Orientado a objetos • Perfecta integración con Java • Closures • Convención de JavaBeans • Esencia vs. Ceremonia • Aritmética con BigDecimal por default para la operación de punto flotante • API’s amigables y prácticas • XML, JDBC, JMX, Swing • DSL(Domain Specific Language) • Builders • Sobrecarga de operadores • GDK
  10. 10. Azúcar sintáctica + GDK • Listas – def numeros = [1,2,3,4,5] • Mapas – def mapa = [DF:'Distrito Federal',MTY:'Monterrey'] • Rangos – def rangos = 199..299 • Asignación Múltiple – def (a,b) = [10,20] • Return Opcional – def metodo(bool) { if(bool) 1 else 0 }
  11. 11. Groovy en profundidad • Meta-programación – La habilidad de un lenguaje para modificarse a sí mismo • Transformaciones AST – @Singleton – @Inmutable, @Lazy, @Delegate – @Newify – @Category & @Mixin – @PackageScope – @Bindable & @Vetoable – @Grab
  12. 12. Aplicaciones Desktop
  13. 13. Let’s code again!!!
  14. 14. Base de Datos
  15. 15. Metaprogramación
  16. 16. Testing
  17. 17. ¿Quieres ser Groovy?
  18. 18. Aun hay algo más… @grailsmx
  19. 19. Esperen… @grailsmx
  20. 20. Agradecimiento • GULEV • @springhispano • @grailsmx
  21. 21. ¿Preguntas? …o comentarios… springhispano.org grails.org.mx @neodevelop @grailsmx

×