SlideShare a Scribd company logo
La importancia de un buen título en presentaciones
Use Groovy & Grails in your Spring Boot
projects,
don't be afraid!
@fatimacasau
La importancia de un buen título en presentaciones
Fátima Casaú Pérez
Software Engineer for over 7 years ago
Java Architect & Scrum Master in Paradigma Tecnológico
Specialized in Groovy & Grails environments
Recently, Spring Boot world
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
@fatimacasau
La importancia de un buen título en presentaciones
What is Spring Boot?
What is Groovy?
Where could you use Groovy in your Spring Boot Projects?
●
Gradle
●
Tests
●
Groovy Templates
●
Anywhere?
●
GORM
●
GSP’s
Overview
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Spring Boot
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Standalone
Auto-configuration - CoC
No XML
Embedded Container and Database
Bootstrapping
Groovy!!
Run quickly - Spring Boot CLI
projects.spring.io/spring-boot
Spring Boot
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Spring Boot application
in a single tweet
DEMO...
La importancia de un buen título en presentaciones
GVM
gvmtool.net
> gvm install springboot
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
HelloWorld.groovy
1  @Controller
2  class ThisWillActuallyRun {
3     @RequestMapping("/")
4     @ResponseBody
5     String home() {
6         "Hello World!"
7     }
8  }
Spring Boot in a single Tweet
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
apply plugin: 'spring­boot'
dependencies {
    compile("org.springframework.boot:spring­boot­starter­web")
 … 
}
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples
La importancia de un buen título en presentaciones
Groovy
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Dynamic language
Optionally typed
@TypeChecked & @CompileStatic
Java Platform
Easy & expressive syntax
Powerful features
closures, DSL, meta-programming, functional programming, scripting, ...
Groovy
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
apply plugin: 'groovy'
dependencies {
    compile("org.codehaus.groovy:groovy­all:2.2.0")
 … 
}
La importancia de un buen título en presentaciones
Where could you use
Groovy?
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Gradle
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Powerful build tool
Support multi-project
Dependency management (based on Apache Ivy)
Support and Integration with Maven & Ivy repositories
Based on Groovy DSL
Build by convention
Ant tasks
Gradle
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Building a Spring Boot
application with Gradle
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
GVM
> gvm install gradle
> gradle build
> gradle tasks
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
build.gradle
1  buildscript {
2     repositories {
3         mavenCentral()
4     }
5     dependencies {
6         classpath("org.springframework.boot:spring­boot­gradle­plugin:1.2.2.RELEASE")
7     }
8  }
9  
10  apply plugin: 'groovy'
11  apply plugin: 'idea'
12  apply plugin: 'spring­boot'
13  
14  jar {
15      baseName = 'helloworld'
16      version = '0.1.0'
17  }
18  
19  repositories {
20      mavenCentral()
21  }
22  
23  dependencies {
24      compile("org.springframework.boot:spring­boot­starter­web")
25  }
La importancia de un buen título en presentaciones
Testing with Spock
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Spock framework & specification
Expressive
Groovy DSL’s
Easy to read tests
Well documented
Powerful assertions
Testing with Spock
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Testing with Spock
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
GoogleSpec.groovy
1 void "test Google Maps API where address is ‘Madrid’"(){
2    setup: “Google Maps API Host & Uri” 
3        def rest = new RESTClient("https://maps.googleapis.com")
4        def uri = "/maps/api/geocode/json"
5    when: “Call the API with address = ‘madrid’”
6        def result = rest.get(path: uri, query: [address:'madrid'])
7    then: “HttpStatus is OK, return a list of results and field status = OK”
8        result
9        result.status == HttpStatus.OK.value()
10        !result.data.results.isEmpty()
11        result.data.status == ‘OK’
12        result.data.toString().contains('Madrid')        
13  }
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
GoogleSpec.groovy
1 void "test Google Maps API with different values"(){
2    setup: “Google Maps API Host & Uri”
3      def rest = new RESTClient("https://maps.googleapis.com")
4      def uri = "/maps/api/geocode/json"
5    expect: “result & status when call the REST API”
6      def result = rest.get(path: uri, query: [address:address])
7      resultsIsEmpty == result.data.results.isEmpty()
8      result.data.status == status
9    where: “address takes different values with different results & status”
10      address | resultsIsEmpty | status
11      'Madrid'| false          | 'OK'
12      'abdkji'| true           | 'ZERO_RESULTS'
13      '186730'| false          | 'ZERO_RESULTS' // This fails!
14         
15  }
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
Assertion failed:  
assert      resultsIsEmpty == result.data.results.isEmpty()
        |               |    |      |     |       |
            false           false       |     |       true
                                 |      |     [...]
                                 |      |
                                 |      ...
                                 ...
docs.spockframework
.org
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
dependencies {
    testCompile("org.springframework.boot:spring­boot­starter­test")
    testCompile("org.springframework:spring­test")
    testRuntime("org.spockframework:spock­spring:0.7­groovy­2.0") {
        exclude group: 'org.spockframework', module: 'spock­core'
    }
    testCompile("org.spockframework:spock­core:0.7­groovy­2.0") {
        exclude group: 'org.codehaus.groovy', module: 'groovy­all'
    }
 … 
}
https://github.com/tomaslin/gs-spring-boot-spock
La importancia de un buen título en presentaciones
Groovy templates
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Groovy Template Framework
Based MarkupBuilder
Groovy DSL’s
Render readable views
Replace variables easily
Groovy templates
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Groovy Templates
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
1 ul {
2    people.each { p ­>
3       li(p.name)
4    }
5 }
With the following model
6 def model = [people: [
7                        new Person(name:'Bob'), 
8                        new Person(name:'Alice')
9              ]]
Renders the following
10 <ul><li>Bob</li><li>Alice</li></ul>
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
dependencies {
    compile("org.springframework.boot:spring­boot­starter­groovy­templates")
 … 
}
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-
boot-sample-web-groovy-templates
La importancia de un buen título en presentaciones
Anywhere!
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Anywhere
Mix Java & Groovy easily
More expressive, simple & flexible than Java
Extension of JDK -> GDK
@CompileStatic @TypeChecked
Controllers, Services, Model,...
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Groovy Controller
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
HelloWorld.groovy
 1 
 2 @Controller
 3 class ThisWillActuallyRun {
 4    @RequestMapping("/")
 5    @ResponseBody
 6    String home() {
 7        "Hello World!"
 8    }
 9 }
@groovy.transform.CompileStatic
La importancia de un buen título en presentaciones
GORM
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Automatic mapping for entities
Dynamic finders, criterias, persistence methods, validation,
mappings, constraints…
Expressive and simple code
implicit getters & setters
implicit constructors
implicit primary key
For Hibernate
For MongoDB
GORM: Grails Object Relational Mapping
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
GORM for Hibernate
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
Customer.groovy
1 @Entity
2 public class Customer {
3
4     String firstName;
5     String lastName;
6
7     static constraints = {
8         firstName blank:false
9         lastName blank:false
10     }
11     static mapping = {
12         firstName column: 'first_name'
13         lastName column: 'last_name'
14     }
15 }
La importancia de un buen título en presentaciones
@fatimacasa
uUse Groovy & Grails in your Spring Boot projects, don't be afraid!
1  [[firstName:"Jack", lastName:"Bauer"],
2   [firstName:"Michelle", lastName:"Dessler"]].each {
3       new Customer(it).save()
4  }
5 
6  def customers = Customer.findAll()
7 
8  customers.each {
9     println it
10 }
11 
12 def customer = Customer.get(1L)
13 
14 customers = Customer.findByLastName("Bauer")
15 customers.each {println it}
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
dependencies {
    compile("org.grails:gorm­hibernate4­spring­boot:1.1.0.RELEASE")
    compile("com.h2database:h2")
 … 
}
https://github.com/fatimacasau/spring-boot-talk/blob/spring-boot-groovy-gorm
La importancia de un buen título en presentaciones
GSP's
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Groovy Server Pages is used by Grails
Large list of useful Tag Libraries
Easy to define new Tags
Not only views
Layouts & Templates
Reuse Code
GSP's: Groovy Server Pages
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
GSP's in Spring Boot
DEMO...
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
1 <g:if test="${session.role == 'admin'}">
2    <%­­ show administrative functions ­­%>
3 </g:if>
4 <g:else>
5    <%­­ show basic functions ­­%>
6 </g:else>
___________________________________________________________________
 1  <g:each in="${[1,2,3]}" var="num">
 2     <p>Number ${num}</p>
 3  </g:each>
___________________________________________________________________
1 <g:findAll in="${books}" expr="it.author == 'Stephen King'">
2      <p>Title: ${it.title}</p>
3 </g:findAll>
___________________________________________________________________
1  <g:dateFormat format="dd­MM­yyyy" date="${new Date()}" />
___________________________________________________________________
1  <g:render template="bookTemplate" model="[book: myBook]" />
La importancia de un buen título en presentaciones
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
dependencies {
    compile("org.grails:grails­gsp­spring­boot:1.0.0")
    compile("org.grails:grails­web­gsp:2.5.0")
    compile("org.grails:grails­web­gsp­taglib:2.5.0")
    compile("org.grails:grails­web­jsp:2.5.0")
 … 
}
https://github.com/grails/grails-boot/tree/master/sample-apps/gsp/gsp-example
La importancia de un buen título en presentaciones
Conclusions
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
If you use Groovy…
Less code
More features
Cool Tests
Cool utilities
Why not? Please try to use Groovy!
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
One moment...
La importancia de un buen título en presentaciones
MVC Spring based Apps
Convention Over Configuration
Bootstrapping
Groovy
GORM
GSP’s ...
It's sounds like Grails!
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Why do you not use Grails?
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
Thanks!!
@fatimacasau
La importancia de un buen título en presentaciones
EXAMPLE
http://github.com/fatimacasau/spring-boot-talk
Simple API Rest with Spring Boot, Groovy and GORM
@fatimacasau
Use Groovy & Grails in your Spring Boot projects, don't be afraid!
La importancia de un buen título en presentaciones
We are hiring!
JEE, Python, PHP, MongoDB, Cassandra, Big Data, Scala, NoSQL,
AngularJS, Javascript, iOS, Android, HTML, CSS3… and Commitment,
Ping Pong, Arcade…
SEND US YOUR CV

More Related Content

What's hot

Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
Mikey Cohen - Hiring Amazing Engineers
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
Edureka!
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
Knoldus Inc.
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Pei-Tang Huang
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Red Hat Developers
 
MongoDB + Java + Spring Data
MongoDB + Java + Spring DataMongoDB + Java + Spring Data
MongoDB + Java + Spring DataAnton Sulzhenko
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
VMware Tanzu
 
Testing with Spring: An Introduction
Testing with Spring: An IntroductionTesting with Spring: An Introduction
Testing with Spring: An Introduction
Sam Brannen
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
Orest Ivasiv
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
 
Automation Framework Presentation
Automation Framework PresentationAutomation Framework Presentation
Automation Framework Presentation
Ben Ngo
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
Spring security
Spring securitySpring security
Spring security
Saurabh Sharma
 

What's hot (20)

Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
 
MongoDB + Java + Spring Data
MongoDB + Java + Spring DataMongoDB + Java + Spring Data
MongoDB + Java + Spring Data
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Testing with Spring: An Introduction
Testing with Spring: An IntroductionTesting with Spring: An Introduction
Testing with Spring: An Introduction
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Automation Framework Presentation
Automation Framework PresentationAutomation Framework Presentation
Automation Framework Presentation
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
 
Spring security
Spring securitySpring security
Spring security
 

Viewers also liked

Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?
Fátima Casaú Pérez
 
Spring boot + spock
Spring boot + spockSpring boot + spock
Spring boot + spock
Fátima Casaú Pérez
 
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
Lari Hotari
 
Introduction To Grails
Introduction To GrailsIntroduction To Grails
Introduction To Grails
Christopher Bartling
 
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011Fátima Casaú Pérez
 
Cambia la forma de desarrollar tus aplicaciones web con groovy y grails
Cambia la forma de desarrollar tus aplicaciones web con groovy y grailsCambia la forma de desarrollar tus aplicaciones web con groovy y grails
Cambia la forma de desarrollar tus aplicaciones web con groovy y grailsFátima Casaú Pérez
 
t3chfest 2016 - Implementando microservicios, como y por que
t3chfest 2016 - Implementando microservicios, como y por quet3chfest 2016 - Implementando microservicios, como y por que
t3chfest 2016 - Implementando microservicios, como y por que
Fátima Casaú Pérez
 
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
Alvaro Sanchez-Mariscal
 
O Spring está morto! Viva o Spring!
O Spring está morto! Viva o Spring!O Spring está morto! Viva o Spring!
O Spring está morto! Viva o Spring!
Josenaldo de Oliveira Matos Filho
 
The report of JavaOne2011 about groovy
The report of JavaOne2011 about groovyThe report of JavaOne2011 about groovy
The report of JavaOne2011 about groovyYasuharu Nakano
 
H2O 3 REST API Overview
H2O 3 REST API OverviewH2O 3 REST API Overview
H2O 3 REST API Overview
Sri Ambati
 
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012kennethaliu
 
Markup Template Engine introduced Groovy 2.3
Markup Template Engine introduced Groovy 2.3Markup Template Engine introduced Groovy 2.3
Markup Template Engine introduced Groovy 2.3
Uehara Junji
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
IndicThreads
 
Introducción a groovy & grails
Introducción a groovy & grailsIntroducción a groovy & grails
Introducción a groovy & grails
Fátima Casaú Pérez
 
Mapa de Historias de Usuario - User Story Map
Mapa de Historias de Usuario - User Story MapMapa de Historias de Usuario - User Story Map
Mapa de Historias de Usuario - User Story Map
Jorge Hernán Abad Londoño
 
React 101
React 101React 101
React 101
Casear Chu
 

Viewers also liked (20)

Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?
 
Spring boot + spock
Spring boot + spockSpring boot + spock
Spring boot + spock
 
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
GGX 2014 Lari Hotari Modular Monoliths with Spring Boot and Grails 3
 
Introduction To Grails
Introduction To GrailsIntroduction To Grails
Introduction To Grails
 
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011
Taller Testing en Grails con Grails y Geb (WebDriver) - Springio I/O 2011
 
2013 greach
2013 greach2013 greach
2013 greach
 
Cambia la forma de desarrollar tus aplicaciones web con groovy y grails
Cambia la forma de desarrollar tus aplicaciones web con groovy y grailsCambia la forma de desarrollar tus aplicaciones web con groovy y grails
Cambia la forma de desarrollar tus aplicaciones web con groovy y grails
 
t3chfest 2016 - Implementando microservicios, como y por que
t3chfest 2016 - Implementando microservicios, como y por quet3chfest 2016 - Implementando microservicios, como y por que
t3chfest 2016 - Implementando microservicios, como y por que
 
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
Creating applications with Grails, Angular JS and Spring Security - GR8Conf E...
 
O Spring está morto! Viva o Spring!
O Spring está morto! Viva o Spring!O Spring está morto! Viva o Spring!
O Spring está morto! Viva o Spring!
 
The report of JavaOne2011 about groovy
The report of JavaOne2011 about groovyThe report of JavaOne2011 about groovy
The report of JavaOne2011 about groovy
 
H2O 3 REST API Overview
H2O 3 REST API OverviewH2O 3 REST API Overview
H2O 3 REST API Overview
 
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
Modularizing your Grails Application with Private Plugins - SpringOne 2GX 2012
 
Branch per user story
Branch per user storyBranch per user story
Branch per user story
 
Markup Template Engine introduced Groovy 2.3
Markup Template Engine introduced Groovy 2.3Markup Template Engine introduced Groovy 2.3
Markup Template Engine introduced Groovy 2.3
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
 
Testing con spock
Testing con spockTesting con spock
Testing con spock
 
Introducción a groovy & grails
Introducción a groovy & grailsIntroducción a groovy & grails
Introducción a groovy & grails
 
Mapa de Historias de Usuario - User Story Map
Mapa de Historias de Usuario - User Story MapMapa de Historias de Usuario - User Story Map
Mapa de Historias de Usuario - User Story Map
 
React 101
React 101React 101
React 101
 

Similar to Use groovy & grails in your spring boot projects

Use Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projectsUse Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projects
Paradigma Digital
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsJames Williams
 
Java to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.ioJava to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.io
Mauricio (Salaboy) Salatino
 
Spring-batch Groovy y Gradle
Spring-batch Groovy y GradleSpring-batch Groovy y Gradle
Spring-batch Groovy y Gradle
Antonio Mas
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovygreach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
Jessie Evangelista
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
Izzet Mustafaiev
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
 
Spring boot 3g
Spring boot 3gSpring boot 3g
Spring boot 3gvasya10
 
JVM Web Frameworks Exploration
JVM Web Frameworks ExplorationJVM Web Frameworks Exploration
JVM Web Frameworks Exploration
Kevin H.A. Tan
 
SpringOne Platform recap 정윤진
SpringOne Platform recap 정윤진SpringOne Platform recap 정윤진
SpringOne Platform recap 정윤진
VMware Tanzu Korea
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
SeongJae Park
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java World
Ken Kousen
 
Take A Gulp at Task Automation
Take A Gulp at Task AutomationTake A Gulp at Task Automation
Take A Gulp at Task Automation
Joel Lord
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon Valley
Sven Haiges
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
Patrick Devins
 
Building full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio CodeBuilding full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio Code
Microsoft Tech Community
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
Michael Yan
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
Fred Lin
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonHamed Hatami
 

Similar to Use groovy & grails in your spring boot projects (20)

Use Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projectsUse Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projects
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
 
Java to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.ioJava to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.io
 
Spring-batch Groovy y Gradle
Spring-batch Groovy y GradleSpring-batch Groovy y Gradle
Spring-batch Groovy y Gradle
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovygreach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Spring boot 3g
Spring boot 3gSpring boot 3g
Spring boot 3g
 
JVM Web Frameworks Exploration
JVM Web Frameworks ExplorationJVM Web Frameworks Exploration
JVM Web Frameworks Exploration
 
Capistrano for non-rubyist
Capistrano for non-rubyistCapistrano for non-rubyist
Capistrano for non-rubyist
 
SpringOne Platform recap 정윤진
SpringOne Platform recap 정윤진SpringOne Platform recap 정윤진
SpringOne Platform recap 정윤진
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java World
 
Take A Gulp at Task Automation
Take A Gulp at Task AutomationTake A Gulp at Task Automation
Take A Gulp at Task Automation
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon Valley
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
Building full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio CodeBuilding full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio Code
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 

Recently uploaded

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 

Recently uploaded (20)

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 

Use groovy & grails in your spring boot projects

  • 1. La importancia de un buen título en presentaciones Use Groovy & Grails in your Spring Boot projects, don't be afraid! @fatimacasau
  • 2. La importancia de un buen título en presentaciones Fátima Casaú Pérez Software Engineer for over 7 years ago Java Architect & Scrum Master in Paradigma Tecnológico Specialized in Groovy & Grails environments Recently, Spring Boot world @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! @fatimacasau
  • 3. La importancia de un buen título en presentaciones What is Spring Boot? What is Groovy? Where could you use Groovy in your Spring Boot Projects? ● Gradle ● Tests ● Groovy Templates ● Anywhere? ● GORM ● GSP’s Overview @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 4. La importancia de un buen título en presentaciones Spring Boot Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 5. La importancia de un buen título en presentaciones Standalone Auto-configuration - CoC No XML Embedded Container and Database Bootstrapping Groovy!! Run quickly - Spring Boot CLI projects.spring.io/spring-boot Spring Boot @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 6. La importancia de un buen título en presentaciones Spring Boot application in a single tweet DEMO...
  • 7. La importancia de un buen título en presentaciones GVM gvmtool.net > gvm install springboot @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 8. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! HelloWorld.groovy 1  @Controller 2  class ThisWillActuallyRun { 3     @RequestMapping("/") 4     @ResponseBody 5     String home() { 6         "Hello World!" 7     } 8  } Spring Boot in a single Tweet
  • 9. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! apply plugin: 'spring­boot' dependencies {     compile("org.springframework.boot:spring­boot­starter­web")  …  } https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples
  • 10. La importancia de un buen título en presentaciones Groovy Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 11. La importancia de un buen título en presentaciones Dynamic language Optionally typed @TypeChecked & @CompileStatic Java Platform Easy & expressive syntax Powerful features closures, DSL, meta-programming, functional programming, scripting, ... Groovy @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 12. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! apply plugin: 'groovy' dependencies {     compile("org.codehaus.groovy:groovy­all:2.2.0")  …  }
  • 13. La importancia de un buen título en presentaciones Where could you use Groovy? Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 14. La importancia de un buen título en presentaciones Gradle Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 15. La importancia de un buen título en presentaciones Powerful build tool Support multi-project Dependency management (based on Apache Ivy) Support and Integration with Maven & Ivy repositories Based on Groovy DSL Build by convention Ant tasks Gradle @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 16. La importancia de un buen título en presentaciones Building a Spring Boot application with Gradle DEMO...
  • 17. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! GVM > gvm install gradle > gradle build > gradle tasks
  • 18. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! build.gradle 1  buildscript { 2     repositories { 3         mavenCentral() 4     } 5     dependencies { 6         classpath("org.springframework.boot:spring­boot­gradle­plugin:1.2.2.RELEASE") 7     } 8  } 9   10  apply plugin: 'groovy' 11  apply plugin: 'idea' 12  apply plugin: 'spring­boot' 13   14  jar { 15      baseName = 'helloworld' 16      version = '0.1.0' 17  } 18   19  repositories { 20      mavenCentral() 21  } 22   23  dependencies { 24      compile("org.springframework.boot:spring­boot­starter­web") 25  }
  • 19. La importancia de un buen título en presentaciones Testing with Spock Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 20. La importancia de un buen título en presentaciones Spock framework & specification Expressive Groovy DSL’s Easy to read tests Well documented Powerful assertions Testing with Spock @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 21. La importancia de un buen título en presentaciones Testing with Spock DEMO...
  • 22. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! GoogleSpec.groovy 1 void "test Google Maps API where address is ‘Madrid’"(){ 2    setup: “Google Maps API Host & Uri”  3        def rest = new RESTClient("https://maps.googleapis.com") 4        def uri = "/maps/api/geocode/json" 5    when: “Call the API with address = ‘madrid’” 6        def result = rest.get(path: uri, query: [address:'madrid']) 7    then: “HttpStatus is OK, return a list of results and field status = OK” 8        result 9        result.status == HttpStatus.OK.value() 10        !result.data.results.isEmpty() 11        result.data.status == ‘OK’ 12        result.data.toString().contains('Madrid')         13  }
  • 23. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! GoogleSpec.groovy 1 void "test Google Maps API with different values"(){ 2    setup: “Google Maps API Host & Uri” 3      def rest = new RESTClient("https://maps.googleapis.com") 4      def uri = "/maps/api/geocode/json" 5    expect: “result & status when call the REST API” 6      def result = rest.get(path: uri, query: [address:address]) 7      resultsIsEmpty == result.data.results.isEmpty() 8      result.data.status == status 9    where: “address takes different values with different results & status” 10      address | resultsIsEmpty | status 11      'Madrid'| false          | 'OK' 12      'abdkji'| true           | 'ZERO_RESULTS' 13      '186730'| false          | 'ZERO_RESULTS' // This fails! 14          15  }
  • 24. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! Assertion failed:   assert      resultsIsEmpty == result.data.results.isEmpty()         |               |    |      |     |       |             false           false       |     |       true                                  |      |     [...]                                  |      |                                  |      ...                                  ... docs.spockframework .org
  • 25. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! dependencies {     testCompile("org.springframework.boot:spring­boot­starter­test")     testCompile("org.springframework:spring­test")     testRuntime("org.spockframework:spock­spring:0.7­groovy­2.0") {         exclude group: 'org.spockframework', module: 'spock­core'     }     testCompile("org.spockframework:spock­core:0.7­groovy­2.0") {         exclude group: 'org.codehaus.groovy', module: 'groovy­all'     }  …  } https://github.com/tomaslin/gs-spring-boot-spock
  • 26. La importancia de un buen título en presentaciones Groovy templates Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 27. La importancia de un buen título en presentaciones Groovy Template Framework Based MarkupBuilder Groovy DSL’s Render readable views Replace variables easily Groovy templates @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 28. La importancia de un buen título en presentaciones Groovy Templates DEMO...
  • 29. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! 1 ul { 2    people.each { p ­> 3       li(p.name) 4    } 5 } With the following model 6 def model = [people: [ 7                        new Person(name:'Bob'),  8                        new Person(name:'Alice') 9              ]] Renders the following 10 <ul><li>Bob</li><li>Alice</li></ul>
  • 30. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! dependencies {     compile("org.springframework.boot:spring­boot­starter­groovy­templates")  …  } https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring- boot-sample-web-groovy-templates
  • 31. La importancia de un buen título en presentaciones Anywhere! Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 32. La importancia de un buen título en presentaciones Anywhere Mix Java & Groovy easily More expressive, simple & flexible than Java Extension of JDK -> GDK @CompileStatic @TypeChecked Controllers, Services, Model,... @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 33. La importancia de un buen título en presentaciones Groovy Controller DEMO...
  • 34. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! HelloWorld.groovy  1   2 @Controller  3 class ThisWillActuallyRun {  4    @RequestMapping("/")  5    @ResponseBody  6    String home() {  7        "Hello World!"  8    }  9 } @groovy.transform.CompileStatic
  • 35. La importancia de un buen título en presentaciones GORM Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 36. La importancia de un buen título en presentaciones Automatic mapping for entities Dynamic finders, criterias, persistence methods, validation, mappings, constraints… Expressive and simple code implicit getters & setters implicit constructors implicit primary key For Hibernate For MongoDB GORM: Grails Object Relational Mapping @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 37. La importancia de un buen título en presentaciones GORM for Hibernate DEMO...
  • 38. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! Customer.groovy 1 @Entity 2 public class Customer { 3 4     String firstName; 5     String lastName; 6 7     static constraints = { 8         firstName blank:false 9         lastName blank:false 10     } 11     static mapping = { 12         firstName column: 'first_name' 13         lastName column: 'last_name' 14     } 15 }
  • 39. La importancia de un buen título en presentaciones @fatimacasa uUse Groovy & Grails in your Spring Boot projects, don't be afraid! 1  [[firstName:"Jack", lastName:"Bauer"], 2   [firstName:"Michelle", lastName:"Dessler"]].each { 3       new Customer(it).save() 4  } 5  6  def customers = Customer.findAll() 7  8  customers.each { 9     println it 10 } 11  12 def customer = Customer.get(1L) 13  14 customers = Customer.findByLastName("Bauer") 15 customers.each {println it}
  • 40. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! dependencies {     compile("org.grails:gorm­hibernate4­spring­boot:1.1.0.RELEASE")     compile("com.h2database:h2")  …  } https://github.com/fatimacasau/spring-boot-talk/blob/spring-boot-groovy-gorm
  • 41. La importancia de un buen título en presentaciones GSP's Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 42. La importancia de un buen título en presentaciones Groovy Server Pages is used by Grails Large list of useful Tag Libraries Easy to define new Tags Not only views Layouts & Templates Reuse Code GSP's: Groovy Server Pages @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 43. La importancia de un buen título en presentaciones GSP's in Spring Boot DEMO...
  • 44. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! 1 <g:if test="${session.role == 'admin'}"> 2    <%­­ show administrative functions ­­%> 3 </g:if> 4 <g:else> 5    <%­­ show basic functions ­­%> 6 </g:else> ___________________________________________________________________  1  <g:each in="${[1,2,3]}" var="num">  2     <p>Number ${num}</p>  3  </g:each> ___________________________________________________________________ 1 <g:findAll in="${books}" expr="it.author == 'Stephen King'"> 2      <p>Title: ${it.title}</p> 3 </g:findAll> ___________________________________________________________________ 1  <g:dateFormat format="dd­MM­yyyy" date="${new Date()}" /> ___________________________________________________________________ 1  <g:render template="bookTemplate" model="[book: myBook]" />
  • 45. La importancia de un buen título en presentaciones @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid! dependencies {     compile("org.grails:grails­gsp­spring­boot:1.0.0")     compile("org.grails:grails­web­gsp:2.5.0")     compile("org.grails:grails­web­gsp­taglib:2.5.0")     compile("org.grails:grails­web­jsp:2.5.0")  …  } https://github.com/grails/grails-boot/tree/master/sample-apps/gsp/gsp-example
  • 46. La importancia de un buen título en presentaciones Conclusions Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 47. La importancia de un buen título en presentaciones If you use Groovy… Less code More features Cool Tests Cool utilities Why not? Please try to use Groovy! @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 48. La importancia de un buen título en presentaciones One moment...
  • 49. La importancia de un buen título en presentaciones MVC Spring based Apps Convention Over Configuration Bootstrapping Groovy GORM GSP’s ... It's sounds like Grails! @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 50. La importancia de un buen título en presentaciones Why do you not use Grails? Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 51. La importancia de un buen título en presentaciones Thanks!! @fatimacasau
  • 52. La importancia de un buen título en presentaciones EXAMPLE http://github.com/fatimacasau/spring-boot-talk Simple API Rest with Spring Boot, Groovy and GORM @fatimacasau Use Groovy & Grails in your Spring Boot projects, don't be afraid!
  • 53. La importancia de un buen título en presentaciones We are hiring! JEE, Python, PHP, MongoDB, Cassandra, Big Data, Scala, NoSQL, AngularJS, Javascript, iOS, Android, HTML, CSS3… and Commitment, Ping Pong, Arcade… SEND US YOUR CV

Editor's Notes

  1. My name is Fatima Casau I’m a software engineer since seven years ago and currently, I work as a Java Architect and Scrum Master in Paradigma Tecnologico Since 6 years ago, I’m specialized in Groovy &amp; Grails technologies and recently, I&amp;apos;m working with Spring Boot. For this, I&amp;apos;m here and I want to tell you my experience about this
  2. Well... In short, What are we going to see in this talk? I’m going to talk about Spring Boot and Groovy and where you could use Groovy in your spring boot projects We go to see... What is Spring Boot What is Groovy And, how or where use both. For example Using Gradle Developing tests with groovy and the Spock framework Using Groovy Templates Or why not?, Anywhere in your projects Also, We will see how to use GORM and GSP’s in a Spring Boot project, outside Grails
  3. In First Place, What is Spring Boot? Question: How many people know Spring Boot? Question: How many people are using Spring Boot currently? (If many people -&amp;gt; As many of you know...
  4. … Spring Boot is a new project from Spring that allows you to develop standalone Spring MVC applications easily. Probably, You think about the many configurations there are in Spring projects, but, Spring Boot, follows Convention Over Configuration allowing Autoconfiguration and configuration with annotations, eliminating the necessity of use XML configuration files. In other hand, Spring Boot allows you to start and build production applications quickly, because provides an embedded container and database according to the dependencies specified in the build system, so, you don&amp;apos;t need to configure this to start to work. Additionally, we can use Groovy, and, of course, all of its features, only including a dependency. Finally, we can run an application quickly thanks to Spring Boot CLI Tool Of course, you can find examples and documentation about all of this on the Spring Boot website in projects (dot) spring (dot) io (slash) spring-boot
  5. We go to see a little but powerful example: We can develop an application that can be contained in a single tweet and execute it quickly with Spring Boot CLI
  6. First, I want to talk about the GVM Tool GVM is a Tool for managing versions of multiple Software Development Kits To use it, you can download in its website gvmtool.net Once you have downloaded, you can see witch framework are available only typing &amp;apos;gvm&amp;apos; you can download Spring Boot with the GVM Tool Once you have installed GVM tool, only you need to do is execute in a terminal gvm install springboot and this will install the latest version of spring boot
  7. Here we have the example: a groovy script with: an annotation (at) Controller that means this is a Controller component two more annotations, to determine the URI and response of the controller and finally, a method that returns the message “Hello World” To execute this, we open a terminal and go to the path that contains the groovy script and type spring run helloWorld.groovy (By command line) go to workspaces/greach14 spring run helloWorld.groovy Later, go to Chrome and type localhost:8080 and see the result It&amp;apos;s only you need to do to start an example
  8. In second place, The next lead actor in this talk, of course, is Groovy! Question: How many people know Groovy? Question: How many people are using Groovy currently?
  9. What is Groovy? Groovy is a dynamic language, optionally typed with static-typing and static compilation capabilities for the Java platform Thanks to an easy and expressive syntax it’s easy to learn for java developers. Furthermore, it integrates easily with any Java program, delivering powerful features, including closures, runtime and compile-time meta-programming, functional programming, scripting, powerful tests...and so on So..., if we combine the power of Spring Boot with the features of Groovy we obtain a couple of powerful tools that allows to developers work in an easy and more productive, interesting and amazing way
  10. Then.... Where could you introduce Groovy in your spring boot applications? In short, anywhere!, but we go to see the different sites in the project where you could use Groovy bit by bit
  11. The first option is use Groovy in the process to build the project using Gradle
  12. With Spring Boot we can build our projects with Maven, but also, we can use Gradle With Maven, we have to manage a static xml file, the pom.xml file, but with Gradle we have a flexible and modular groovy file that it&amp;apos;s more easy to read thanks to a friendly syntax based on Groovy DSL’s and a plugin model With Gradle, we have a powerful building tool with many features such as support for multi-project, dependency management based on Apache Ivy, with support and integration with Maven and Ivy repositories.. And also, we have a large list of tasks based on Ant to manage our application
  13. See you how to use
  14. Like with Spring Boot, we can download and manage our versions of Gradle with GVM Tool Later, we only need to create a build.gradle file with some dependencies and execute the command gradle build to compile, test and assemble the code into a jar file. If we execute gradle ‘tasks’ we can see a list of available for our project.
  15. This is an example of build.gradle file. We can see some plugins such as groovy, idea or spring boot, of course. Also, we have got the configurations about the jar file, the name and the version of our project Below, the repositories configuration and the dependencies. If you include some plugin more and execute the ‘tasks’ command again, you will can see new tasks in the list, the tasks are related with the dependencies available in the project
  16. Other site where use Groovy is implementing tests using the framework Spock. This is my favorite section I like to implement tests with groovy and Spock framework
  17. Why? Spock is not only a test framework, Spock is a test specification for Groovy and Java projects With an expressive language, its also based on Groovy DSL’s and this makes our tests become easy to read and well documented. Moreover, when an assertion failed, the exit is very intuitive and easy to read as well.
  18. Let me to show some examples of simple spock tests and how to use its test blocks
  19. For example, With Spock we can define test with descriptive signatures. We can organize the code in intuitive blocks such as: “given” or “setup” to setup initial variables, for example, “when” to execute an action and “then” to test the result. In this block we needn’t asserts, only test if a sentence is true or not by the use of groovy truth
  20. In the other hand we have got two blocks more, ‘expect’ and ‘where’. With this blocks we can test different combinations of data in only one test and later, we will see what iterations it has failed and what not easily
  21. Here, we can view the way to show the assertions failed. It’s very easy read the failure In addition to these, we have more features with diferents tags and utilities. Please visit the documentation and test the examples I think that this is a good point to start with Groovy and know the features and the simplicity of the language
  22. Another possibility is the use of Groovy templates
  23. Groovy Template Framework is based on MarkupBuild that permits a pretty and easy way to write readable Groovy Views using Groovy DSL&amp;apos;s Also, provide an easy way to replace variables in the view
  24. See you an example
  25. In this block, we have an ‘ul’ block where a people list is iterated and for each person, its name is printed in a li element. We can pass a list and iterate it in the view easily If we return this view and, in the model, we send this list of people, we obtain the result printed in the line below Right?
  26. Well..., Really, You can use Groovy anywhere in your spring boot project
  27. Yes! Anywhere! We can use Groovy in controllers, services, domain classes… If we need, we can combine Java &amp; Groovy easily, that is, if we need have classes in Java &amp; in other hand, classes in Groovy, it is possible. And, you must to know that the most important features of use groovy over java is that our applications will be very simple, expressive and flexible, will have less code and, if there are less code, there will be less errors. This is a fact! Furthermore, with Groovy we have many features available than with Java, because Groovy provides the GDK as an extension of JDK with many more features about the use of Strings, collections, control structures, closures… and so on. Finally, you could think about compilation in runtime or dynamic typing, but, if you are worry about this, you must to know that you can use Static Compilation or Static Typing with the annotations (at)CompileStatic and (at)TypeChecked in your classes.
  28. Here, I won&amp;apos;t to show anything different, only, the same controller in the beginning of the talk but with the use of CompileStatic annotation
  29. Only, you need to add the annotation (at)CompileStatic in the definition of the class This code should already run as fast as Java.
  30. The use of GORM with Spring Boot GORM is the Grails Object Relational Mapping
  31. Since Grails 2.4, It is possible to use GORM outside of Grails, and this permits access relational database or MongoDB with GORM in a Spring Application including the correct dependency in the project. With GORM we can map the entities automatically, we have dynamic finders, criterias, persistence methods, validations… and more. We don’t need implements getters &amp; setters methods, constructors or specify the primary key. With this features, our code is even simple
  32. See some code...
  33. This is a domain class implemented with Groovy and using GORM. The annotation @Entity indicates that we are using GORM. We can specify some constraints easily, or some mapping options.
  34. Now, see how to use a domain class with GORM. For example. We can instance new object of the class with a map in the constructor and we have not defined this constructor In other hand, We have dynamic finders without implement it, findAll, get, findBy… any attributes… and many more
  35. As GORM, we can use GSP’s (Groovy Server Pages) outside of Grails.
  36. With GSP’s we have a large list of Tag libraries that we can use to make our views more simple. Also, we can create easily our own tags or we can define layouts, templates and reuse the code easily
  37. See some examples of predefined tags:
  38. conditional tags as g:if and g:else iterator tags as g:each or using a finder that iterates a list with a condition g:dateFormat to format dates in view easily g:render to render templates sending a model and many more! Also, remind that you can implements your own tags easily
  39. well… after all of this… What are the conclusions? (Almost my conclusions)
  40. If you use Groovy… as I’ve said before, your application has less lines of code, so, less errors, if there are errors, you can find them easily so, you will be more productive Remind that with Groovy you can get more features for your project, you can implement cool test and you can use cool utilities, this is: you have a super-vitaminized Project! Then, Why not use Groovy in your Spring Boot project? Please, use Groovy! Try to introduce bit to bit in the application. Begin with Spock tests, later, introduce groovy in the code of your services, and so on.
  41. But, one moment...
  42. We have talked about MVC Spring Based Apps Convention Over Configuration Application Bootstrapping Groovy Language GORM GSP’s…. This sounds like Grails! And also, Grails 3.0 is built on Spring Boot!! So, I want to leave you with a question,... Why not use Grails instead of Spring Boot?
  43. The next lead actor in this talk is Groovy! Question: How many people know Groovy? Question: How many people are using Groovy currently?
  44. One more thing. In Paradigma, we are hiring for people specialized in many technologies as you can see, so, if your are interested or you know somebody could be interested, please, send us your CV &amp;lt;number&amp;gt;