Groovy, Grails, & Gr8Ladies

  • 56 views
Uploaded on

The Intro to Groovy and Grails talk I had prepared but wasn't able to give at She's Geeky.

The Intro to Groovy and Grails talk I had prepared but wasn't able to give at She's Geeky.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
56
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
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. She’s Geeky Minneapolis, MN Feb 21-22, 2014
  • 2.  Gvmtool.net  curl –s get.gvmtool.net | bash  gvm install groovy  gvm install grails
  • 3.  An organization for the support of women in the Gr8 stack community  Goals:  Educating women  Networking  Professional Development  Contact Us  @Gr8Ladies on twitter  Gr8Ladies.org  LinkedIn
  • 4.  Groovy – the language  Grails – MVC framework for JVM  Gradle –build automation tool  Now used to build Android Apps  Griffon – desktop app framework  Spock – testing framework  Many other minor frameworks and development tools
  • 5. Image via: http://blogs.vitoria-gasteiz.org/ti/2010/05/31/full-stack/ c
  • 6.  easy to learn dynamic language similar to Python, PHP, Ruby, and Perl  optional typing  default scope  optional getters/setters  Compiled to bytecode for the JVM  Integrates with existing JAVA libraries and infrastructure  #groovylang
  • 7.  In Java,  In Groovy,
  • 8.  Elvis Operator ?:  In PHP:  In Groovy:
  • 9.  Ranges  A collection of numbers defined by boundaries  Spread dot  Applies a function to every element of a collection and returns the result
  • 10.  Null safe  User?.chapter?.toUpperCase()  will return null if user or chapter is null and will not return an error  Groovy Truth  Null, empty string, empty set, and 0 are all false!
  • 11. Image via: http://blogs.vitoria-gasteiz.org/ti/2010/05/31/full-stack/ c
  • 12.  MVC framework  similar to Symphony in PHP, Django in Python, or Ruby on Rails  Convention over configuration  Built on Hibernate and Spring  Dependency Injection  #grailsfw
  • 13.  Domain Classes  Grails Object Relationship Mapping(GORM)  Uses Hibernate  Class names map to tables  Field names map to columns  Dynamic finders  User.findAllByGenderAndChapterIsNotNull(‘F’)  Events  beforeInsert, afterUpdate, beforeDelete  Alternatives include Mongo and Redis
  • 14.  Mapped to urls by name  /user/list  UserController.list()  Url Parameters map to controller  /user/show/id UserController.show(id)
  • 15.  GSP(Groovy Server Page)  Similar to a JSP  Directory structure by convention  UserController.list() renders /views/user/list.gsp  Special tags for forms, links, and other tasks  Reference model data by ${model.attribute}
  • 16.  Lots of Options for writing tests  Spock (default)  JUnit  Geb
  • 17.  GVM!  Groovy enVironment Manager  curl –s get.gvmtool.net | bash  gvm install groovy  gvm install grails  And you’re done!
  • 18.  grails create-app appName  auto generates app structure  grails create-domain-class User  Creates domain class and test file  grails generate-all User  Auto generates views and controllers based on the properties of the domain class
  • 19.  Grails war  Defaults to target/appName-0.1.war  Deploy to JVM  Example via Amazon ElasticBeanstalk
  • 20.  Making Java Groovy – Ken Kousen  Email jstrater@gr8ladies.org for coupon code  Programming Grails – Bert Beckwith (O’reilly animal book)  Groovy In Action - Dierk Koenig with Andrew Glover, Paul King, Guillaume Laforge and Jon Skeet  Many Tutorials available on grails.org
  • 21.  Come to Groovy Users of Minnesota(GUM) every second Tuesday of the month at Smart Things  Join Gr8Ladies for hack sessions and contribute to the gr8ladies website on github