Your SlideShare is downloading. ×
0
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
Groovy and Grails intro
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

Groovy and Grails intro

2,894

Published on

A sample introduction to Groovy and Grails. It´s not finished yet.

A sample introduction to Groovy and Grails. It´s not finished yet.

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

No Downloads
Views
Total Views
2,894
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
99
Comments
0
Likes
5
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 and Grails introduction A pragmatic view Miguel Ángel Pastor Olivar miguelinlas3 at gmail dot com http://miguelinlas3.blogspot.com http://twitter.com/miguelinlas3
  • 2. Spring Jetty Database Eclipse Web Architecture Java IntelliJ DSL's Software Patterns Maven Groovy Tomcat Unit Testing ByteCode Agile Netbeans Dynamic Languages Domain Design Dependency Injection Grails Sitemesh Hibernate Plugin Architecture
  • 3. Java Platform
  • 4. Java Platform
    • Java is a platform, not a language
    • 5. Interprets bytecode (.class files)
    • 6. Multiple platform support (Linux, OSx,...)
    • 7. Garbage collection
    • 8. Java Language
    • 9. . . .
  • 10. Java Platform
    • JSR 924: Virtual Machine Specification
    • 11. JSR 901: Java Language Specification
    • 12. JSR 241: Groovy Language Specification
    • 13. JSR 274: Bean Shell Scripting Language
    • 14. JSR 292: Supporting Dynamically Typed Languages (JavaScript,Scala,Python, . . .)
  • 15. Java Platform
    • DaVinci Machine: OpenJDK subproject
    • 16. Multiple Language support (especially dynamic)
    • 17. JVM Extensions
    • 18. Co-existing with Java
    • 19. Common base model (garbage collection, model execution, . . . )
  • 20. Groovy Features
  • 21. Groovy
    • Dynamic Language for the JVM
    • 22. Additional power features like Python, Ruby and Smalltalk
    • 23. Modern programming features to Java developers
    • 24. DSLs: easy to read and maintain
    • 25. Writing shell and build script easy (Ant DSL,OO)
  • 26. Groovy
    • Strong typing (optional)
    • 27. Duck typing
    • 28. Java Object Model
    • 29. Closures: High Order Functions
    • 30. Easy Java Integration
    • 31. Similar to Java syntax
  • 32. Installing Groovy
    • Download latest release: download
    • 33. Set environment variable GROOVY_HOME
    • 34. Add GROOVY_HOMEin to the path
    • 35. Open a console and type: groovy -v
    • 36. Ready to work!
  • 37. Groovy Datatypes
    • Everything is a object
    • 38. Optional typing
    • 39. Overriding operators
    • 40. Working with strings
    • 41. Working with regular expressions
    • 42. Working with numbers
  • 43. Groovy Collections
    • Working with ranges
    • 44. Working with lists
    • 45. Working with maps
    • 46. Concurrent modifications
  • 47. Working with closures
    • Piece of code wrapped up as an object
    • 48. Syntax: code in curly braces
    • 49. Assign it to a variable
    • 50. Using methods as closures
            • reference.&someMethod
    • Calling them explicitly
    • 51. Return from closures
  • 52. Control Structures
    • Working with if-else
    • 53. Working with switch
    • 54. Working with while
    • 55. Iterating over closures
    • 56. Return values from if/else
    • 57. Return values from exception handlers
  • 58. Object Orientation
    • Similar to Java Model
    • 59. Methods and fields: modifiers are not needed
    • 60. Positional and named parameters
    • 61. Dynamics:
                • ObjReference.'method-name'
    • Coercion with as operator
    • 62. Coercion in assignment
    • 63. Type aliasing
  • 64. Database programming
    • SQL easier
    • 65. SQL more Groovy
    • 66. Performing read queries
    • 67. Performing write queries
    • 68. A practical example
  • 69. Working with builders
    • Domain Specific Languages hype
    • 70. Easy to read and maintain
    • 71. Building DSL: outside the limits
    • 72. Using DSL: building RCP apps
  • 73. References
    • http://groovy.codehaus.org/Documentation
    • 74. Groovy in Action ( Second Edition Early Access )
    • 75. Programming Groovy
    • 76. Neo Metrics products: AquaBM, UserMgmt
    • 77. Surf the web!
  • 78. Grails Features
  • 79. Motivations and pros
    • Unnecessary complexity (DRY)
    • 80. Grails,Rails,Django, TurboGears
    • 81. Reduce complexity
    • 82. Built on top proven technologies
    • 83. Full stack development
    • 84. SpringSource
  • 85. Architecture (I)
    • ORM built on Hibernate
    • 86. Views technologies: Groovy Server Pages
    • 87. Controller layer built on Spring MVC
    • 88. Command layer based on Gant
    • 89. Embedded Tomcat (and Jetty). Fly reloading
    • 90. Depedency Injection based on Spring
    • 91. Support for internazionalitation
  • 92. Architecture (II)
    • Transactional service layer (Spring´s transactions)
    • 93. Groovy power
    • 94. Extensive use of Domain Specific Languages
    • 95. Plugins architecture
  • 96. Installing Grails
    • Download latest release: download
    • 97. Set environment variable GRAILS_HOME
    • 98. Add GRAILS_HOMEin to the path
    • 99. Open a console and type: grails help
    • 100. Ready to work!
  • 101. Beginning Grails
    • Our first Grails application
    • 102. Setting up an IDE: Spring Tool Suite
    • 103. Convention over configuration
  • 104. Beginning Grails
    • Running application: grails run-app
    • 105. Testing application: grails test-app
    • 106. Deploying application: grails war
    • 107. Servlet 2.4+ container
  • 108. GORM (I)
    • Creating domain class: grails create-domain-class
    • 109. Create operation
    • 110. Read operation
    • 111. Update operation
    • 112. Delete operation
  • 113. GORM (II)
    • Domain modeling: POGO
    • 114. Asocciation: one to one
    • 115. Association: one to many
    • 116. Association: many to many
    • 117. Inheritance
    • 118. Performance tips
    • 119. Cascading updates and deletes
  • 120. GORM (III)
    • Basics querying: List, retrieve by id
    • 121. Dynamic finders: findBy, findByAll
    • 122. Method expressions: findBy([Property][Comparator][Boolean Operator])?[Property][Comparator]
    • 123. Criteria: building complex queries
    • 124. Programmatic transactions: withTransaction
  • 125. Controllers (I)
  • 133. Controllers (II)
    • Model and View: a model is a map
    • 134. Explicit model return or controller properties
    • 135. Rendering views: grails-app/views/controller/actionName.gsp
    • 136. Use of render. Rendering xml, json
    • 137. More concepts: interceptors, filters
  • 138. Groovy Server Pages (I)
    • View technology: similar to JSP or ASP
    • 139. HTML + tags
    • 140. <% %> embed code (discouraged!!)
    • 141. Prefedined variables
          • Application
          • 142. ApplicationContext
          • 143. Flash
          • 144. GrailsApplication
          • 145. Out, params, request, response, session webrequest
  • 146. Groovy Server Pages (II)
    • Page directives: import classes
    • 147. Views and templates.
    • 148. GSP Builting Tags: <g:XXX>
            • Logic and iteration
            • 149. Search and filtering
            • 150. Links and resources
            • 151. Form and fields
  • 152. The service layer (I)
    • Not embed application logic in controllers
    • 153. New service: grails create-service
    • 154. Transacional by default: static transactional = false
    • 155. Depedency injection by convention
    • 156. Reusable logic
    • 157. Use from Java classes
  • 158. References
    • http://grails.org/doc/latest/
    • 159. Grails in action: http://www.manning.com/gsmith/
    • 160. The Definitive Guide to Grails, Second Edition
    • 161. http://www.grailstutorials.com/home/
  • 162. Real examples
  • 163. Some real examples
    • Cronos: sample management app
    • 164. Doing REST in Grails
  • 165. Thank you very much all for coming!

×