SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
Guill aume
 La forge




              a very rich
              and lively
             ecosystem
Guillaume Laforge / @glaforge

• Groovy Project Manager
• Head of Groovy Development
  at SpringSource
• Initiator of the Grails framework
• Founder of the Gaelyk toolkit
• Co-author of Groovy in Action
• Member of «Les Cast Codeurs» podcast

• Speaker: JavaOne, QCon, JavaZone, Sun TechDays,
  Devoxx, The Spring Experience, SpringOne2GX,
  JAX, Dynamic Language World, IJTC, and more...

                                                    2
The Groovy Ecosystem

• Many projects based on Groovy!
• Serve various purposes:
 – build applications (ie. frameworks)
   •Grails (web apps), Griffon (Swing apps),
    Gaelyk (Google App Engine)
 – tame new concurrency paradigms
   •GPars (actors, agents, fork/join, map/filter/reduce...)
 – enhanced testing
   •Easyb (BDD), Spock (BDD&mock), Gmock (mocking)
 – help building projects
   •Gant (ant sugar), Gradle (adhoc build system)
 – web services interaction
   •HTTPBuilder (REST), GroovyWS (SOAP)
                                                              3
Prayer
to the
demo
 gods
Application frameworks
Grails (1/4)




               6
Grails (2/4)

• Built-on proven and rock-solid OSS technologies

•Spring
  – IoC/DI, MVC, WebFlow
•Hibernate
  – ORM mapping layer
  – H2: embedded Java database
•Tomcat
  – Local servlet container
•Groovy
  – To glue everything together!
• SiteMesh, Quartz...
                                                    7
Grails (3/4)

• Grails is an MVC web application stack
  – Domain classes mapped to datastores (RDBMS, NoSQL)
    •Transparent mapping
  – Controllers and service classes in Groovy
  – GSP (JSP-like template engine), with powerful taglibs


• Smart reloading as you make changes live

• Comes with its own command-line interface
  – Creating artifacts, building/testing the project, etc.



                                                             8
Grails (4/4)

• Hundreds of plugins available (559!)
 – Which let you expand your application easily
 – Providing functionality you won’t have to implement
 – You may hear about ‘Plugin Oriented Architecture’


• Some of the most used ones
 – Searchable: add Google-like search interface
 – Mail: easily send emails
 – Quartz: for your batch jobs
 – GraniteDS / Flex Scaffold: use a Flex UI frontend
 – Spring Security: authentication / authorization
 – and 554 other ones :-)

                                                         9
Griffon (1/4)

• Griffon is a Grails-like application framework for
  developing rich desktop applications

  – MVC, DRY, CoC patterns

  – Easy threading,
    data binding
    and observing

  – Support in IDEs

  – Lost of plugins too!


                                                       10
Griffon (2/4)

• Let’s create a simple demo console
  for executing Groovy scripts

• A data model

       import groovy.beans.Bindable

       class DemoConsoleModel {
           String scriptSource
           @Bindable scriptResult
           @Bindable boolean enabled = true
       }



                                              11
Griffon (3/4)

• A controller
    class DemoConsoleController {
                                            )
        GroovyShell shell = new GroovyShell(

        // automatically injected by Griffon
        def model, view

        def executeScript(evt = null) {
            model.enabled = false
            doOutside {
                                                            rce)
                def re sult = shell.evaluate(model.scriptSou
                edt {
                    model.enabled = true
                    model.scriptResult = result
                }
            }
        }
    }

                                                                   12
Griffon (4/4)

 • And a view
                                                               rm: true) {
application(title: 'DemoC onsole', pack: true, locationByPlatfo
  panel(border: emptyBorder(6)) {
    borderLayout()

        scrollPane(constraints: CENTER) {                             tSource'),
            textArea(text: bind(t arget: model, targetProperty: 'scrip
                     enabled: bind { model.enabled },
                     columns: 40, rows: 10)
        }

        hbox(constraints: SOUTH) {                               uteScript,
            button("Execut e", actionPerformed: controller.&exec
                   enabled: bind { model.enabled })
            hstrut 5
            label "Result:"
            hstrut 5
                                                   }
            label text: bind { model.scriptResult
        }
    }
}
                                                                                   13
Griffon (4/4)

 • And a view
                                                               rm: true) {
application(title: 'DemoC onsole', pack: true, locationByPlatfo
  panel(border: emptyBorder(6)) {
    borderLayout()

        scrollPane(constraints: CENTER) {                             tSource'),
            textArea(text: bind(t arget: model, targetProperty: 'scrip
                     enabled: bind { model.enabled },
                     columns: 40, rows: 10)
        }

        hbox(constraints: SOUTH) {                               uteScript,
            button("Execut e", actionPerformed: controller.&exec
                   enabled: bind { model.enabled })
            hstrut 5
            label "Result:"
            hstrut 5
                                                   }
            label text: bind { model.scriptResult
        }
    }
}
                                                                                   13
• Lightweight Groovy toolkit for building and
  deploying applications on Google App Engine

 – On top of the Groovy servlet
   •executing scripts as mere servlets
   •for the controllers


 – On top of the Groovy template engine
   •JSP-flavored templates
   •for the views


 – Plus lots of sugaring of GAE SDK APIs

                                                14
• Don’t miss my Gaelyk presentation!
  –Tuesday, 13:00-13:50, Room C1




                                       15
Taming concurrency
GPars (1/6)

• Concurrency library

• Multiple high-level abstractions
  – actors
  – map / filter / reduce
  – fork / join
  – asynchronous closures
  – agents
  – dataflow concurrency


• Can be used with Java!

                                     17
GPars (2/6)

• Improving over JSR-166y’s ParallelArray
                                          oin
     GParsPool.withPool { // using fork/j
         // a map-reduce functional style
         def smallestSelfPortrait =
                                                  me }
             images.parallel.filter { it.contains
                            .map    { it.resize() }
                            .min    { it.sizeInMB }
     }



• Asynchronous closures returning Futures

    GParsExecutorsPool.withPool { // using JDK executors
        // adds callAsync() to closures
        assert 6 == { it * 2 }.callAsync(3).get()
    }
                                                           18
GPars (3/6)

• Improving over JSR-166y’s Fork / Join
 – Think devide and conquer problems

   withPool(2) { pool ->
       println "Number of files: " +
                                                  file ->
           runForkJoin(new File("./src")) { File
               long count = 0
               file.eachFile {
                    if (it.isDirectory()) {
                                                             t"
                        println "Forking a child task for $i
                        // fork a child task
                        forkOffChild(it)
                    } else {
                        count++
                    }
                }
                // use results of children tasks
                // to calculate and store own result
                return count + childrenResults.sum(0)
            }
    }
                                                                  19
GPars (4/6)

•Actors
  loop {
      println 'Waiting for a gift'
      react { gift ->
          if (myWife.likes(gift)) {
              reply 'Thank you!'
          } else {
              reply 'Try again, please'
              react { anotherGift ->
                   if (myChildren.like(anotherGift))
                       reply 'Thank you!'
              }
          }
       }
   }

 – (see also dynamic dispatch actors, and more)
                                                       20
GPars (5/6)

• DataFlow concurrency

        new DataFlows().with {
            task {
                z = x + y
                println "Result: ${z.val}"
            }

             task {
                 x = 10
             }

             task {
                 y = 5
             }
         }


                                             21
GPars (6/6)

•Agents           class Conference extends Agent<Intege
                                                        r> {
                      def Conference() { super(0) }
 – thread-safe        private register(long num)    { data += num }
                                                              num }
   non-blocking       pr ivate unregister(long num) { data -=
                  }
   shared                                               ce()
                  final Agent conference = new Conferen
   mutable
                  // send commands in parallel threads
   state          final Thread t1 = Thread.start {
   wrappers           conference << { register 10 }
                  }
                  final Thread t2 = Thread.start {
                      conference << { register 5 }
                  }
                  final Thread t3 = Thread.start {
                      conference << { unregister 3 }
                  }

                  [t1, t2, t3]*.join()
                  assert 12 == conference.val

                                                                      22
Testing
Easyb (1/4)

• From the website:
  – «Easyb is a behavior driven development (BDD)
    framework for the Java platform. By using a specification
    based Domain-Specific Language, Easyb aims to enable
    executable, yet readable documentation»


• Write specifications in Groovy

• BDD == given / when / then paradigm

• Run them from CLI, Maven, or Ant
  – provides various report formats

                                                                24
Easyb (2/4)

• First, let’s write a story

  given "an invalid zip code"


                                           ialized"
  an d "given the zipcodevalidator is init


                                           lid zip code"
  wh en "validate is invoked with the inva


                                          turn false"
   th en "the validator instance should re




                                                           25
Easyb (3/4)

• Let’s write the test itself

  given "an invalid zip code", {
      invalidzipcode = "221o1"
  }
                                           ialized", {
  an d "given the zipcodevalidator is init
       zipvalidate = new ZipCodeValidator()
  }
                                           lid zip code", {
  wh en "validate is invoked with the inva
                                            zipcode)
       value = zipvalidate.validate(invalid
  }
                                         turn false", {
  th en "the validator instance should re
       value.shouldBe false
  }



• Then write code that makes the test pass
                                                              26
Easyb (4/4)

• There’s also the specification format

                                           instance", {
       before "initialize zipcodevalidator
           zipvalidate = new ZipCodeValidator()
       }
                                            {
       it "should deny invalid zip codes",         zip ->
           [" 221o1", "2210", "22010-121o"].each {
                zipvalidate.validate(zip).is false
           }
       }
                                           {
       it "should accept valid zip codes",
                                                 { zip ->
           ["22101", "22100", "22010-1210"].each
                                                     ue
               zipvalidate.validate(zip).shouldBe tr
           }
       }




                                                            27
Spock (1/3)

• From the horse’s mouth:
 – « Spock is a testing and specification framework for Java
   and Groovy applications. What makes it stand out from
   the crowd is its beautiful and highly expressive
   specification language. »

                                            n {
      class HelloSpock extends Specificatio
                                                   () {
          def "can you figure out what I'm up to?"
              expect:
              name.size() == size

              where:
              name       |   size
              "Kirk"     |   4
              "Spock"    |   5
              "Scotty"   |   6
          }
      }
                                                               28
Spock (2/3)

• Extensible (but transparent) use of AST
  transformations to «pervert» the Groovy language
  – reuse of labels for the BDD actions


• Spock brought Groovy 1.7’s enhanced asserts

                Condition not satisfied:

                max(a, b) == c
                |   |  |  |  |
                3   1  3  |  2
                          false


                                                     29
Spock (3/3)

• Another example of the expressive language
  – with powerful mocking capabilities



                                                         ce"() {
 def   "subscribers  receive published events at least on
       when: publisher.send(event)
                                             nt)
       then: (1.._) * subscriber.receive(eve
       where: even t << ["started", "paused", "stopped"]
 }




                                                                   30
Geb — Browser testing (1/2)

import geb.*                                            • Selenium
  
Browser.drive("http://google.com/ncr
                                     ") {                 based
  assert title == "Google"
                                     field
  // enter wikipedia into the search
  $("input", name: "q").value("wikipe
                                      dia")
                                                        • Usages
  // wait for the change to results
                                    page to happen        – Web testing
                                     t a new request)
  // (google updates the page withou
  waitFor { title.endsWith("Google Se
                                      arch") }            – Screen
                                                            scraping
  // is the first link to wikipedia?
  def firstLink = $("li.g", 0).find("a
                                       .l")
                                      ia"
                                                          – Process
  assert firstLink.text() == "Wikiped
                                                            automation
  // click the link
  firstLink.click()

  // wait for Google's javascript to
                                     redirect           • JQuery-like
  // us to Wikipedia
  waitFor { title == "Wikipedia" }
                                                          syntax for
}                                                         matching
                                                                        31
Geb — Browser testing (2/2)

                    import geb.spock.GebSpec
                     
• Integrated with   class MySpec extends GebSpec {
                     
  – Spock               def "test something"() {
  – EasyB                   when:
                            go "/help"
  – JUnit 3/4                then:
                             $("h1").text() == "Help"
                         }
• An example
                        // base URL to avoid repetition
  with Spock            String getBaseUrl() {
                            "http://myapp.com"
                        }
                        // chose a specific browser
                        WebDriver createDriver() {
                            new FirefoxDriver()
                        }
                    }
                                                          32
GMock (1/3)

• GMock is a mocking framework for Groovy
                                                  path/file.txt"))
     File mo ckFile = mock(File, constructor("/a/
                                          ")
     mockFile.getName().returns("file.txt
     play {
                                               ")
         def file = new File("/a/path/file.txt
                                               ()
         assertEquals "file.txt", file.getName
     }



• Mocking capabilities

  – method calls                            – constructor calls
  – property access                         – time matching
  – static calls                            – order matching
  – partial mocks                           – regex method matching


                                                                      33
GMock (2/3)

• Mocking method calls
      def loader = mock()
      loader.put("fruit").returns("apple")

      play {
                                               uit")
          assertEquals "apple", loader.put("fr
      }


• Mock static calls
      def mockMath = mock(Math)
                                           )
      mockMath.static.random().returns(0.5

      play {
          assertEquals 0.5, Math.random()
      }




                                                       34
GMock (3/3)

• Expecting exceptions
                                                               exception")
   loader.put("throw exce ption").raises(RuntimeException, "an




• Time matching
  – never, once, atLeastOnce, atMostOnce, stub, times,
    atLeast, atMost

                                             tOnce()
        mockLoader.load(2).returns(3).atLeas
        play {
                                             2)
            assertEquals 3, mockLoader.load(
                                             2)
            assertEquals 3, mockLoader.load(
        }


                                                                             35
Building applications
Groovy’s own AntBuilder

• Groovy comes with a DSL wrapper around Ant
 – so you can reuse any Ant trask with a Groovy syntax

 new AntBuilder().sequential {
     mkdir dir: "target/classes"                              vy.ant.Groovyc"
     taskdef name: "gro  ovyc", classname: "org.codehaus.groo
                                            "target/classes", {
     groovyc srcdir: "src/main", destdir:
          classpath {
              fileset dir: "lib", {
                   include name: "*.jar"
              }
              pathelement path: "target/classes"
          }
                                                debug: "on"
          javac source: "1.5", target: "1.5",
      }
                                                       me.jar", {
      jar basedi r: "target/classes", destfile: "jarna
          manifest {                                            "My project"
              attribute   name: "Implementation-Title", value:
                                                          value: "1.2.3"
               attrib ute name: "Implementation-Version",
           }
      }
      echo "BUILD SUCCESSFUL"
  }
                                                                                37
Gant

• Gant is a tool for scripting Ant tasks using Groovy
  instead of XML to specify the logic
       includeTargets << gant.targets.Clean
                                            ]
       cleanPattern << ['**/*~', '**/*.bak'
       cleanDirectory << 'build'
                                            uff.') {
       target(stuff: 'A target to do some st
           println 'Stuff'
           depends clean
                                                 Ant.'
           echo message: 'A default message from
           otherStuff()
       }
                                               other stuff') {
       target(otherStuff: 'A target to do some
           println 'OtherStuff'
                                               Ant.'
           echo message: 'Another message from
           clean()
       }

       setDefaultTarget stuff


                                                                 38
Gradle (1/3)

• Gradle is an enterprise-grade build system

 – A very flexible general purpose build tool like Ant
 – Switchable, build-by-convention frameworks à la Maven,
   for Java, Groovy and Scala projects
 –Groovy build scripts
 – Powerful support for multi-project builds
 – Dependency management based on Ivy
 – Full support for existing Maven or Ivy repository infra
 – Support for transitive dependency management
 – Ant tasks and builds as first class citizens



                                                             39
Gradle (2/3)

• For example, for a classical Java project


    apply plugin: ‘java’

    repositories {
        mavenCentral()
    }

    dependencies {
        compile group: ‘commons-collection’,
                                                         .2’
               modu le: ‘commons-collection’, version: ‘3
        testCompile group: ‘junit’,
                    module: ‘junit’, version: ‘4.+’
    }




                                                               40
Gradle (3/3)

• Major projects migrate to Gradle
  – Hibernate
  – Various SpringSource projects
  – Groovy -based projects
    •Grails, Groovy, GPars, Gaelyk
  – Customers with 200+ multi-projects




                                         41
Other build and quality tools

• You can use Ant, Gant, Maven (GMaven plugin) or
  Gradle to build your projects
  – fits nicely in any existing build and continuous
    integration infrastructure


• A few Groovy-friendly tools provide handy metrics
  – CodeNarc: provides various rules for static analysis of
    your Groovy codebase (style, size, braces, naming...)
  – GMetrics: code metrics
  – Simian: detects duplication in your Groovy code base
  – Cobertura, Clover: give code coverage metrics



                                                              42
u al ity
Q




                      ic s
                   t r
                e
               M
• Static code analysis for Groovy code source
  – Think PMD, checkstyle, FindBugs for Groovy


• Helps you find:
  – defects, bad practices, inconsistencies, style issues


• Several useful rules:
  – Basic, braces, concurrency, design, DRY, exception
    handling, generics, imports, JUnit usage, logging,
    naming conventions, size/complexity, unnecessary/
    unused code



                                                            44
CodeNarc (2/2)




                 45
GMetrics (1/2)

• Provides calculations and reporting of size and
  complexity metrics

• Calculations
  – Cyclomatic complexity
  – ABC size and complexity
  – Lines per method
  – Lines per class




                                                    46
GMetrics (2/2)




                 47
Sonar integration




                    • A Groovy plugin for Sonar
                      provides integration for:

                      – CodeNarc: for code quality
                      – GMetrics: for metrics
                      – Cobertura: for code coverage


                                                   48
Web services
HTTPBuilder (1/3)

• HTTPBuilder provides a convenient builder API for
  complex HTTP requests
                                                           )
 def http = new HTTP Builder( 'http://ajax.googleapis.com'

 http.request(GET, JSON) {
                                           '
     uri.path = '/ajax/services/search/web
                                             Hobbes']
     ur i.query = [v: '1.0', q: 'Calvin and
                                                         refox/3.0.4'
     headers.'User- Agent' = 'Mozilla/5.0 Ubuntu/8.10 Fi

     response.success = { resp, json ->
         println resp.statusLine
         json.responseData.results.each {                       l}"
             println " ${ it.titleNoFormatting}: ${it.visibleUr
         }
     }
 }


                                                                        50
HTTPBuilder (2/3)

• Posting to a URL

     import
groovyx.net.http.HTTPBuilder
                                              pe.URLENC
     import
static
groovyx.net.http.ContentTy
     

                                                 r.com/statuses/'
)
     de f
http
=
new
HTTPBuilder(
'http://twitte
                                                     tpbuilder']
     def
po stBody
=
[status:
'update!',
source:
'ht
                                               tBody,
      http.post(
path:
'update.xml',
body:
pos
                                                  resp
‐>
      

 








requestContentType:
URLENC
)
{

      

                                                          ine}"
      



printl n
"Tweet
response
status:
${resp.statusL
                                               
200
      



assert
resp.statusLine.statusCode
==
      }




                                                                      51
HTTPBuilder (3/3)

• Posting XML content to a URL


            http.request(POST,
XML)
{
            



body
=
{
            







auth
{
            











user
'Bob'
            











password
'pass'
            







}
            



}
            }




                                          52
GroovyWS (1/4)




                 « I always feel a bit dirty,
  DISCLAIMER     speaking about SOAP »



                                                53
GroovyWS (2/4)

• Publishing and consuming WS-I
  compliant SOAP web services
   import groovyx.net.ws.WSClient

   def proxy = new WSClient(                               asmx?WSDL",
       "http://www.w3 schools.com/webservices/tempconvert.
       this.class.classLoader)
   proxy.initialize()
                                          t(0)
    def result = proxy.CelsiusToFahrenhei
                                                       grees Farhenheit"
    println "You are probably freezing at ${result} de




• Can also deal with complex objects



                                                                           54
GroovyWS (3/4)

• Publishing a service
  – considering a service

    class MathService {                                     }
        double add(do uble arg0, double arg1) { arg0 + arg1
                                               g0 }
        do uble square(double arg0) { arg0 * ar
    }


  – publishing the service

 import groovyx.net.ws.WSServer

 def server = new WSServer()                           /MathService")
 server.setNode(" MathService", "http://localhost:6980
 server.start()




                                                                        55
GroovyWS (4/4)

• Make sure to check soapUI
  – lets you write SOAP Web Services testing
  – using Groovy scripts to define a scenario!


• You’ll feel much less dirty :-)




                                                 56
a ry
   m m
S u
Summary

• «Groovy» is way more than just a language!

• It’s also a very rich and active ecosystem!
  – Grails, Griffon, Gradle, GPars, Spock, Gaelyk...




                                                       58
a ry
   m m
S u
Thanks for your attention!




                      e
              e Laforg velopment
   Gu illaum oovy De         m
          of Gr e@gmail.co
   Head laforg
    E mail: g glaforge
              @
    T witter:

                                   • References:
                                    • http://groovy.codehaus.org/
                                    • http://grails.org
                                    • http://gaelyk.appspot.com/


                                                                    60
Images used in this
presentation
 Zeus: http://clarte.eu.com/religions/articles/LArtdetrouveretderoberleFeuspirituelmultiplicateur/zeus-greek-mythology-687267_1024_768.jpg
 Building: http://www.morguefile.com/archive/display/211651
 Announce: http://www.napleswebdesign.net/wp-content/uploads/2009/06/press_release_11.jpg
 Processors: http://www.morguefile.com/archive/display/12930
 Trafic lights: http://www.flickr.com/photos/mad_house_photography/4440871380/sizes/l/in/photostream/
 Bolts: http://www.morguefile.com/archive/display/29038
 Web: http://www.morguefile.com/archive/display/137778
 Light bulb: https://newsline.llnl.gov/retooling/mar/03.28.08_images/lightBulb.png
 Quality metrics: http://www.morguefile.com/archive/display/14314
 Duke ok GAE http://weblogs.java.net/blog/felipegaucho/archive/ae_gwt_java.png
 Green leaf: http://www.flickr.com/photos/epsos/3384297473/
 Jeepers creepers: http://www.flickr.com/photos/27663074@N07/3413698337/
 Earth: http://www.flickr.com/photos/wwworks/2222523978/
 Trafic light: http://rihancompany.com/var/243/35581-Traffic%20light%20drawing.jpg
 Griffon: http://aldaria02.a.l.pic.centerblog.net/lz2levrz.jpg
 Soap: http://www.flickr.com/photos/geishaboy500/104137788/
 Disclaimer: http://4.bp.blogspot.com/_OyM252mHWvo/TT53ltKn7xI/AAAAAAAAC-A/YUNqmzfwce0/s1600/disclaimer.jpg.png




                                                                                                                                             61

Mais conteúdo relacionado

Mais procurados

[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?Srijan Technologies
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptVisual Engineering
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IVisual Engineering
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptKaty Slemon
 
Maintainable JavaScript 2011
Maintainable JavaScript 2011Maintainable JavaScript 2011
Maintainable JavaScript 2011Nicholas Zakas
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Luciano Mammino
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with JestMichał Pierzchała
 
ES6, 잘 쓰고 계시죠?
ES6, 잘 쓰고 계시죠?ES6, 잘 쓰고 계시죠?
ES6, 잘 쓰고 계시죠?장현 한
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)Chris Cowan
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​FDConf
 
Adventures In JavaScript Testing
Adventures In JavaScript TestingAdventures In JavaScript Testing
Adventures In JavaScript TestingThomas Fuchs
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptLars Thorup
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Expressjguerrero999
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developersTricode (part of Dept)
 
iOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentiOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentBrian Gesiak
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejsAmit Thakkar
 

Mais procurados (20)

[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescript
 
Maintainable JavaScript 2011
Maintainable JavaScript 2011Maintainable JavaScript 2011
Maintainable JavaScript 2011
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
 
ES6, 잘 쓰고 계시죠?
ES6, 잘 쓰고 계시죠?ES6, 잘 쓰고 계시죠?
ES6, 잘 쓰고 계시죠?
 
Zenly - Reverse geocoding
Zenly - Reverse geocodingZenly - Reverse geocoding
Zenly - Reverse geocoding
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
 
«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​
 
Adventures In JavaScript Testing
Adventures In JavaScript TestingAdventures In JavaScript Testing
Adventures In JavaScript Testing
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScript
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Express
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developers
 
iOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentiOS Behavior-Driven Development
iOS Behavior-Driven Development
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 

Destaque

Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engineDuoyi Wu
 
Javascript framework and backbone
Javascript framework and backboneJavascript framework and backbone
Javascript framework and backboneDaniel Lv
 
groovy DSLs from beginner to expert
groovy DSLs from beginner to expertgroovy DSLs from beginner to expert
groovy DSLs from beginner to expertPaul King
 
Groovy overview, DSLs and ecosystem - Mars JUG - 2010
Groovy overview, DSLs and ecosystem - Mars JUG - 2010Groovy overview, DSLs and ecosystem - Mars JUG - 2010
Groovy overview, DSLs and ecosystem - Mars JUG - 2010Guillaume Laforge
 
Backbone.js
Backbone.jsBackbone.js
Backbone.jsVO Tho
 

Destaque (6)

Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engine
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Javascript framework and backbone
Javascript framework and backboneJavascript framework and backbone
Javascript framework and backbone
 
groovy DSLs from beginner to expert
groovy DSLs from beginner to expertgroovy DSLs from beginner to expert
groovy DSLs from beginner to expert
 
Groovy overview, DSLs and ecosystem - Mars JUG - 2010
Groovy overview, DSLs and ecosystem - Mars JUG - 2010Groovy overview, DSLs and ecosystem - Mars JUG - 2010
Groovy overview, DSLs and ecosystem - Mars JUG - 2010
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 

Semelhante a Groovy Ecosystem - JFokus 2011 - Guillaume Laforge

Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Jonathan Felch
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
Porting legacy apps to Griffon
Porting legacy apps to GriffonPorting legacy apps to Griffon
Porting legacy apps to GriffonJames Williams
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...Codemotion
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneidermfrancis
 
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneAndres Almiray
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Helma / RingoJS – Vienna.js Minitalk
Helma / RingoJS – Vienna.js MinitalkHelma / RingoJS – Vienna.js Minitalk
Helma / RingoJS – Vienna.js MinitalkPhilipp Naderer
 
Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction ISSGC Summer School
 
Exploring Clojurescript
Exploring ClojurescriptExploring Clojurescript
Exploring ClojurescriptLuke Donnet
 
Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You TestSchalk Cronjé
 

Semelhante a Groovy Ecosystem - JFokus 2011 - Guillaume Laforge (20)

Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Porting legacy apps to Griffon
Porting legacy apps to GriffonPorting legacy apps to Griffon
Porting legacy apps to Griffon
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
 
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
 
Gradle
GradleGradle
Gradle
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Helma / RingoJS – Vienna.js Minitalk
Helma / RingoJS – Vienna.js MinitalkHelma / RingoJS – Vienna.js Minitalk
Helma / RingoJS – Vienna.js Minitalk
 
Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction
 
Exploring Clojurescript
Exploring ClojurescriptExploring Clojurescript
Exploring Clojurescript
 
Gephi Toolkit Tutorial
Gephi Toolkit TutorialGephi Toolkit Tutorial
Gephi Toolkit Tutorial
 
Grails 101
Grails 101Grails 101
Grails 101
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You Test
 

Mais de Guillaume Laforge

Lift off with Groovy 2 at JavaOne 2013
Lift off with Groovy 2 at JavaOne 2013Lift off with Groovy 2 at JavaOne 2013
Lift off with Groovy 2 at JavaOne 2013Guillaume Laforge
 
Groovy workshop à Mix-IT 2013
Groovy workshop à Mix-IT 2013Groovy workshop à Mix-IT 2013
Groovy workshop à Mix-IT 2013Guillaume Laforge
 
Les nouveautés de Groovy 2 -- Mix-IT 2013
Les nouveautés de Groovy 2 -- Mix-IT 2013Les nouveautés de Groovy 2 -- Mix-IT 2013
Les nouveautés de Groovy 2 -- Mix-IT 2013Guillaume Laforge
 
Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012Guillaume Laforge
 
Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Guillaume Laforge
 
Groovy update at SpringOne2GX 2012
Groovy update at SpringOne2GX 2012Groovy update at SpringOne2GX 2012
Groovy update at SpringOne2GX 2012Guillaume Laforge
 
Groovy 1.8 et 2.0 au BreizhC@mp 2012
Groovy 1.8 et 2.0 au BreizhC@mp 2012Groovy 1.8 et 2.0 au BreizhC@mp 2012
Groovy 1.8 et 2.0 au BreizhC@mp 2012Guillaume Laforge
 
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012Guillaume Laforge
 
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume LaforgeGroovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume LaforgeGuillaume Laforge
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
Groovy 2.0 - Devoxx France 2012
Groovy 2.0 - Devoxx France 2012Groovy 2.0 - Devoxx France 2012
Groovy 2.0 - Devoxx France 2012Guillaume Laforge
 
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011Guillaume Laforge
 
GPars et PrettyTime - Paris JUG 2011 - Guillaume Laforge
GPars et PrettyTime - Paris JUG 2011 - Guillaume LaforgeGPars et PrettyTime - Paris JUG 2011 - Guillaume Laforge
GPars et PrettyTime - Paris JUG 2011 - Guillaume LaforgeGuillaume Laforge
 
Groovy Update - Guillaume Laforge - Greach 2011
Groovy Update - Guillaume Laforge - Greach 2011Groovy Update - Guillaume Laforge - Greach 2011
Groovy Update - Guillaume Laforge - Greach 2011Guillaume Laforge
 
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011Guillaume Laforge
 
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...Guillaume Laforge
 

Mais de Guillaume Laforge (20)

Lift off with Groovy 2 at JavaOne 2013
Lift off with Groovy 2 at JavaOne 2013Lift off with Groovy 2 at JavaOne 2013
Lift off with Groovy 2 at JavaOne 2013
 
Groovy workshop à Mix-IT 2013
Groovy workshop à Mix-IT 2013Groovy workshop à Mix-IT 2013
Groovy workshop à Mix-IT 2013
 
Les nouveautés de Groovy 2 -- Mix-IT 2013
Les nouveautés de Groovy 2 -- Mix-IT 2013Les nouveautés de Groovy 2 -- Mix-IT 2013
Les nouveautés de Groovy 2 -- Mix-IT 2013
 
Groovy 2 and beyond
Groovy 2 and beyondGroovy 2 and beyond
Groovy 2 and beyond
 
Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012
 
Groovy 2.0 webinar
Groovy 2.0 webinarGroovy 2.0 webinar
Groovy 2.0 webinar
 
Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012
 
Groovy update at SpringOne2GX 2012
Groovy update at SpringOne2GX 2012Groovy update at SpringOne2GX 2012
Groovy update at SpringOne2GX 2012
 
JavaOne 2012 Groovy update
JavaOne 2012 Groovy updateJavaOne 2012 Groovy update
JavaOne 2012 Groovy update
 
Groovy 1.8 et 2.0 au BreizhC@mp 2012
Groovy 1.8 et 2.0 au BreizhC@mp 2012Groovy 1.8 et 2.0 au BreizhC@mp 2012
Groovy 1.8 et 2.0 au BreizhC@mp 2012
 
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
 
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume LaforgeGroovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
Groovy 2.0 - Devoxx France 2012
Groovy 2.0 - Devoxx France 2012Groovy 2.0 - Devoxx France 2012
Groovy 2.0 - Devoxx France 2012
 
Whats new in Groovy 2.0?
Whats new in Groovy 2.0?Whats new in Groovy 2.0?
Whats new in Groovy 2.0?
 
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011
Groovy Update, new in 1.8 and beyond - Guillaume Laforge - Devoxx 2011
 
GPars et PrettyTime - Paris JUG 2011 - Guillaume Laforge
GPars et PrettyTime - Paris JUG 2011 - Guillaume LaforgeGPars et PrettyTime - Paris JUG 2011 - Guillaume Laforge
GPars et PrettyTime - Paris JUG 2011 - Guillaume Laforge
 
Groovy Update - Guillaume Laforge - Greach 2011
Groovy Update - Guillaume Laforge - Greach 2011Groovy Update - Guillaume Laforge - Greach 2011
Groovy Update - Guillaume Laforge - Greach 2011
 
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
 
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...
Groovy Update, what's new in Groovy 1.8 and beyond - Guillaume Laforge - Spri...
 

Último

Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 

Último (20)

Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 

Groovy Ecosystem - JFokus 2011 - Guillaume Laforge

  • 1. Guill aume La forge a very rich and lively ecosystem
  • 2. Guillaume Laforge / @glaforge • Groovy Project Manager • Head of Groovy Development at SpringSource • Initiator of the Grails framework • Founder of the Gaelyk toolkit • Co-author of Groovy in Action • Member of «Les Cast Codeurs» podcast • Speaker: JavaOne, QCon, JavaZone, Sun TechDays, Devoxx, The Spring Experience, SpringOne2GX, JAX, Dynamic Language World, IJTC, and more... 2
  • 3. The Groovy Ecosystem • Many projects based on Groovy! • Serve various purposes: – build applications (ie. frameworks) •Grails (web apps), Griffon (Swing apps), Gaelyk (Google App Engine) – tame new concurrency paradigms •GPars (actors, agents, fork/join, map/filter/reduce...) – enhanced testing •Easyb (BDD), Spock (BDD&mock), Gmock (mocking) – help building projects •Gant (ant sugar), Gradle (adhoc build system) – web services interaction •HTTPBuilder (REST), GroovyWS (SOAP) 3
  • 7. Grails (2/4) • Built-on proven and rock-solid OSS technologies •Spring – IoC/DI, MVC, WebFlow •Hibernate – ORM mapping layer – H2: embedded Java database •Tomcat – Local servlet container •Groovy – To glue everything together! • SiteMesh, Quartz... 7
  • 8. Grails (3/4) • Grails is an MVC web application stack – Domain classes mapped to datastores (RDBMS, NoSQL) •Transparent mapping – Controllers and service classes in Groovy – GSP (JSP-like template engine), with powerful taglibs • Smart reloading as you make changes live • Comes with its own command-line interface – Creating artifacts, building/testing the project, etc. 8
  • 9. Grails (4/4) • Hundreds of plugins available (559!) – Which let you expand your application easily – Providing functionality you won’t have to implement – You may hear about ‘Plugin Oriented Architecture’ • Some of the most used ones – Searchable: add Google-like search interface – Mail: easily send emails – Quartz: for your batch jobs – GraniteDS / Flex Scaffold: use a Flex UI frontend – Spring Security: authentication / authorization – and 554 other ones :-) 9
  • 10. Griffon (1/4) • Griffon is a Grails-like application framework for developing rich desktop applications – MVC, DRY, CoC patterns – Easy threading, data binding and observing – Support in IDEs – Lost of plugins too! 10
  • 11. Griffon (2/4) • Let’s create a simple demo console for executing Groovy scripts • A data model import groovy.beans.Bindable class DemoConsoleModel { String scriptSource @Bindable scriptResult @Bindable boolean enabled = true } 11
  • 12. Griffon (3/4) • A controller class DemoConsoleController { ) GroovyShell shell = new GroovyShell( // automatically injected by Griffon def model, view def executeScript(evt = null) { model.enabled = false doOutside { rce) def re sult = shell.evaluate(model.scriptSou edt { model.enabled = true model.scriptResult = result } } } } 12
  • 13. Griffon (4/4) • And a view rm: true) { application(title: 'DemoC onsole', pack: true, locationByPlatfo panel(border: emptyBorder(6)) { borderLayout() scrollPane(constraints: CENTER) { tSource'), textArea(text: bind(t arget: model, targetProperty: 'scrip enabled: bind { model.enabled }, columns: 40, rows: 10) } hbox(constraints: SOUTH) { uteScript, button("Execut e", actionPerformed: controller.&exec enabled: bind { model.enabled }) hstrut 5 label "Result:" hstrut 5 } label text: bind { model.scriptResult } } } 13
  • 14. Griffon (4/4) • And a view rm: true) { application(title: 'DemoC onsole', pack: true, locationByPlatfo panel(border: emptyBorder(6)) { borderLayout() scrollPane(constraints: CENTER) { tSource'), textArea(text: bind(t arget: model, targetProperty: 'scrip enabled: bind { model.enabled }, columns: 40, rows: 10) } hbox(constraints: SOUTH) { uteScript, button("Execut e", actionPerformed: controller.&exec enabled: bind { model.enabled }) hstrut 5 label "Result:" hstrut 5 } label text: bind { model.scriptResult } } } 13
  • 15. • Lightweight Groovy toolkit for building and deploying applications on Google App Engine – On top of the Groovy servlet •executing scripts as mere servlets •for the controllers – On top of the Groovy template engine •JSP-flavored templates •for the views – Plus lots of sugaring of GAE SDK APIs 14
  • 16. • Don’t miss my Gaelyk presentation! –Tuesday, 13:00-13:50, Room C1 15
  • 18. GPars (1/6) • Concurrency library • Multiple high-level abstractions – actors – map / filter / reduce – fork / join – asynchronous closures – agents – dataflow concurrency • Can be used with Java! 17
  • 19. GPars (2/6) • Improving over JSR-166y’s ParallelArray oin GParsPool.withPool { // using fork/j // a map-reduce functional style def smallestSelfPortrait = me } images.parallel.filter { it.contains .map { it.resize() } .min { it.sizeInMB } } • Asynchronous closures returning Futures GParsExecutorsPool.withPool { // using JDK executors // adds callAsync() to closures assert 6 == { it * 2 }.callAsync(3).get() } 18
  • 20. GPars (3/6) • Improving over JSR-166y’s Fork / Join – Think devide and conquer problems withPool(2) { pool -> println "Number of files: " + file -> runForkJoin(new File("./src")) { File long count = 0 file.eachFile { if (it.isDirectory()) { t" println "Forking a child task for $i // fork a child task forkOffChild(it) } else { count++ } } // use results of children tasks // to calculate and store own result return count + childrenResults.sum(0) } } 19
  • 21. GPars (4/6) •Actors loop { println 'Waiting for a gift' react { gift -> if (myWife.likes(gift)) { reply 'Thank you!' } else { reply 'Try again, please' react { anotherGift -> if (myChildren.like(anotherGift)) reply 'Thank you!' } } } } – (see also dynamic dispatch actors, and more) 20
  • 22. GPars (5/6) • DataFlow concurrency new DataFlows().with { task { z = x + y println "Result: ${z.val}" } task { x = 10 } task { y = 5 } } 21
  • 23. GPars (6/6) •Agents class Conference extends Agent<Intege r> { def Conference() { super(0) } – thread-safe private register(long num) { data += num } num } non-blocking pr ivate unregister(long num) { data -= } shared ce() final Agent conference = new Conferen mutable // send commands in parallel threads state final Thread t1 = Thread.start { wrappers conference << { register 10 } } final Thread t2 = Thread.start { conference << { register 5 } } final Thread t3 = Thread.start { conference << { unregister 3 } } [t1, t2, t3]*.join() assert 12 == conference.val 22
  • 25. Easyb (1/4) • From the website: – «Easyb is a behavior driven development (BDD) framework for the Java platform. By using a specification based Domain-Specific Language, Easyb aims to enable executable, yet readable documentation» • Write specifications in Groovy • BDD == given / when / then paradigm • Run them from CLI, Maven, or Ant – provides various report formats 24
  • 26. Easyb (2/4) • First, let’s write a story given "an invalid zip code" ialized" an d "given the zipcodevalidator is init lid zip code" wh en "validate is invoked with the inva turn false" th en "the validator instance should re 25
  • 27. Easyb (3/4) • Let’s write the test itself given "an invalid zip code", { invalidzipcode = "221o1" } ialized", { an d "given the zipcodevalidator is init zipvalidate = new ZipCodeValidator() } lid zip code", { wh en "validate is invoked with the inva zipcode) value = zipvalidate.validate(invalid } turn false", { th en "the validator instance should re value.shouldBe false } • Then write code that makes the test pass 26
  • 28. Easyb (4/4) • There’s also the specification format instance", { before "initialize zipcodevalidator zipvalidate = new ZipCodeValidator() } { it "should deny invalid zip codes", zip -> [" 221o1", "2210", "22010-121o"].each { zipvalidate.validate(zip).is false } } { it "should accept valid zip codes", { zip -> ["22101", "22100", "22010-1210"].each ue zipvalidate.validate(zip).shouldBe tr } } 27
  • 29. Spock (1/3) • From the horse’s mouth: – « Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification language. » n { class HelloSpock extends Specificatio () {     def "can you figure out what I'm up to?"         expect:         name.size() == size         where:         name | size "Kirk" | 4 "Spock" | 5 "Scotty" | 6     } } 28
  • 30. Spock (2/3) • Extensible (but transparent) use of AST transformations to «pervert» the Groovy language – reuse of labels for the BDD actions • Spock brought Groovy 1.7’s enhanced asserts Condition not satisfied: max(a, b) == c |   |  |  |  | 3   1  3  |  2           false 29
  • 31. Spock (3/3) • Another example of the expressive language – with powerful mocking capabilities ce"() { def "subscribers receive published events at least on     when: publisher.send(event) nt)   then: (1.._) * subscriber.receive(eve     where: even t << ["started", "paused", "stopped"] } 30
  • 32. Geb — Browser testing (1/2) import geb.* • Selenium    Browser.drive("http://google.com/ncr ") { based   assert title == "Google" field   // enter wikipedia into the search   $("input", name: "q").value("wikipe dia") • Usages   // wait for the change to results page to happen – Web testing t a new request)   // (google updates the page withou   waitFor { title.endsWith("Google Se arch") } – Screen scraping   // is the first link to wikipedia?   def firstLink = $("li.g", 0).find("a .l") ia" – Process   assert firstLink.text() == "Wikiped automation   // click the link   firstLink.click()   // wait for Google's javascript to redirect • JQuery-like   // us to Wikipedia   waitFor { title == "Wikipedia" } syntax for } matching 31
  • 33. Geb — Browser testing (2/2) import geb.spock.GebSpec   • Integrated with class MySpec extends GebSpec {   – Spock     def "test something"() { – EasyB         when:         go "/help" – JUnit 3/4         then:         $("h1").text() == "Help"     } • An example // base URL to avoid repetition with Spock String getBaseUrl() {         "http://myapp.com"     } // chose a specific browser WebDriver createDriver() {         new FirefoxDriver()     } } 32
  • 34. GMock (1/3) • GMock is a mocking framework for Groovy path/file.txt")) File mo ckFile = mock(File, constructor("/a/ ") mockFile.getName().returns("file.txt play { ")   def file = new File("/a/path/file.txt ()   assertEquals "file.txt", file.getName } • Mocking capabilities – method calls – constructor calls – property access – time matching – static calls – order matching – partial mocks – regex method matching 33
  • 35. GMock (2/3) • Mocking method calls def loader = mock() loader.put("fruit").returns("apple") play { uit")   assertEquals "apple", loader.put("fr } • Mock static calls def mockMath = mock(Math) ) mockMath.static.random().returns(0.5 play {     assertEquals 0.5, Math.random() } 34
  • 36. GMock (3/3) • Expecting exceptions exception") loader.put("throw exce ption").raises(RuntimeException, "an • Time matching – never, once, atLeastOnce, atMostOnce, stub, times, atLeast, atMost tOnce() mockLoader.load(2).returns(3).atLeas play { 2)     assertEquals 3, mockLoader.load( 2)     assertEquals 3, mockLoader.load( } 35
  • 38. Groovy’s own AntBuilder • Groovy comes with a DSL wrapper around Ant – so you can reuse any Ant trask with a Groovy syntax new AntBuilder().sequential { mkdir dir: "target/classes" vy.ant.Groovyc" taskdef name: "gro ovyc", classname: "org.codehaus.groo "target/classes", { groovyc srcdir: "src/main", destdir: classpath { fileset dir: "lib", { include name: "*.jar" } pathelement path: "target/classes" } debug: "on" javac source: "1.5", target: "1.5", } me.jar", { jar basedi r: "target/classes", destfile: "jarna manifest { "My project" attribute name: "Implementation-Title", value: value: "1.2.3" attrib ute name: "Implementation-Version", } } echo "BUILD SUCCESSFUL" } 37
  • 39. Gant • Gant is a tool for scripting Ant tasks using Groovy instead of XML to specify the logic includeTargets << gant.targets.Clean ] cleanPattern << ['**/*~', '**/*.bak' cleanDirectory << 'build' uff.') { target(stuff: 'A target to do some st println 'Stuff' depends clean Ant.' echo message: 'A default message from otherStuff() } other stuff') { target(otherStuff: 'A target to do some println 'OtherStuff' Ant.' echo message: 'Another message from clean() } setDefaultTarget stuff 38
  • 40. Gradle (1/3) • Gradle is an enterprise-grade build system – A very flexible general purpose build tool like Ant – Switchable, build-by-convention frameworks à la Maven, for Java, Groovy and Scala projects –Groovy build scripts – Powerful support for multi-project builds – Dependency management based on Ivy – Full support for existing Maven or Ivy repository infra – Support for transitive dependency management – Ant tasks and builds as first class citizens 39
  • 41. Gradle (2/3) • For example, for a classical Java project apply plugin: ‘java’ repositories { mavenCentral() } dependencies { compile group: ‘commons-collection’, .2’ modu le: ‘commons-collection’, version: ‘3 testCompile group: ‘junit’, module: ‘junit’, version: ‘4.+’ } 40
  • 42. Gradle (3/3) • Major projects migrate to Gradle – Hibernate – Various SpringSource projects – Groovy -based projects •Grails, Groovy, GPars, Gaelyk – Customers with 200+ multi-projects 41
  • 43. Other build and quality tools • You can use Ant, Gant, Maven (GMaven plugin) or Gradle to build your projects – fits nicely in any existing build and continuous integration infrastructure • A few Groovy-friendly tools provide handy metrics – CodeNarc: provides various rules for static analysis of your Groovy codebase (style, size, braces, naming...) – GMetrics: code metrics – Simian: detects duplication in your Groovy code base – Cobertura, Clover: give code coverage metrics 42
  • 44. u al ity Q ic s t r e M
  • 45. • Static code analysis for Groovy code source – Think PMD, checkstyle, FindBugs for Groovy • Helps you find: – defects, bad practices, inconsistencies, style issues • Several useful rules: – Basic, braces, concurrency, design, DRY, exception handling, generics, imports, JUnit usage, logging, naming conventions, size/complexity, unnecessary/ unused code 44
  • 47. GMetrics (1/2) • Provides calculations and reporting of size and complexity metrics • Calculations – Cyclomatic complexity – ABC size and complexity – Lines per method – Lines per class 46
  • 49. Sonar integration • A Groovy plugin for Sonar provides integration for: – CodeNarc: for code quality – GMetrics: for metrics – Cobertura: for code coverage 48
  • 51. HTTPBuilder (1/3) • HTTPBuilder provides a convenient builder API for complex HTTP requests ) def http = new HTTP Builder( 'http://ajax.googleapis.com' http.request(GET, JSON) { ' uri.path = '/ajax/services/search/web Hobbes'] ur i.query = [v: '1.0', q: 'Calvin and refox/3.0.4' headers.'User- Agent' = 'Mozilla/5.0 Ubuntu/8.10 Fi response.success = { resp, json -> println resp.statusLine json.responseData.results.each { l}" println " ${ it.titleNoFormatting}: ${it.visibleUr } } } 50
  • 52. HTTPBuilder (2/3) • Posting to a URL import
groovyx.net.http.HTTPBuilder pe.URLENC import
static
groovyx.net.http.ContentTy 
 r.com/statuses/'
) de f
http
=
new
HTTPBuilder(
'http://twitte tpbuilder'] def
po stBody
=
[status:
'update!',
source:
'ht tBody, http.post(
path:
'update.xml',
body:
pos resp
‐> 

 








requestContentType:
URLENC
)
{
 
 ine}" 



printl n
"Tweet
response
status:
${resp.statusL 
200 



assert
resp.statusLine.statusCode
== } 51
  • 53. HTTPBuilder (3/3) • Posting XML content to a URL http.request(POST,
XML)
{ 



body
=
{ 







auth
{ 











user
'Bob' 











password
'pass' 







} 



} } 52
  • 54. GroovyWS (1/4) « I always feel a bit dirty, DISCLAIMER speaking about SOAP » 53
  • 55. GroovyWS (2/4) • Publishing and consuming WS-I compliant SOAP web services import groovyx.net.ws.WSClient def proxy = new WSClient( asmx?WSDL", "http://www.w3 schools.com/webservices/tempconvert. this.class.classLoader) proxy.initialize() t(0) def result = proxy.CelsiusToFahrenhei grees Farhenheit" println "You are probably freezing at ${result} de • Can also deal with complex objects 54
  • 56. GroovyWS (3/4) • Publishing a service – considering a service class MathService { } double add(do uble arg0, double arg1) { arg0 + arg1 g0 } do uble square(double arg0) { arg0 * ar } – publishing the service import groovyx.net.ws.WSServer def server = new WSServer() /MathService") server.setNode(" MathService", "http://localhost:6980 server.start() 55
  • 57. GroovyWS (4/4) • Make sure to check soapUI – lets you write SOAP Web Services testing – using Groovy scripts to define a scenario! • You’ll feel much less dirty :-) 56
  • 58. a ry m m S u
  • 59. Summary • «Groovy» is way more than just a language! • It’s also a very rich and active ecosystem! – Grails, Griffon, Gradle, GPars, Spock, Gaelyk... 58
  • 60. a ry m m S u
  • 61. Thanks for your attention! e e Laforg velopment Gu illaum oovy De m of Gr e@gmail.co Head laforg E mail: g glaforge @ T witter: • References: • http://groovy.codehaus.org/ • http://grails.org • http://gaelyk.appspot.com/ 60
  • 62. Images used in this presentation Zeus: http://clarte.eu.com/religions/articles/LArtdetrouveretderoberleFeuspirituelmultiplicateur/zeus-greek-mythology-687267_1024_768.jpg Building: http://www.morguefile.com/archive/display/211651 Announce: http://www.napleswebdesign.net/wp-content/uploads/2009/06/press_release_11.jpg Processors: http://www.morguefile.com/archive/display/12930 Trafic lights: http://www.flickr.com/photos/mad_house_photography/4440871380/sizes/l/in/photostream/ Bolts: http://www.morguefile.com/archive/display/29038 Web: http://www.morguefile.com/archive/display/137778 Light bulb: https://newsline.llnl.gov/retooling/mar/03.28.08_images/lightBulb.png Quality metrics: http://www.morguefile.com/archive/display/14314 Duke ok GAE http://weblogs.java.net/blog/felipegaucho/archive/ae_gwt_java.png Green leaf: http://www.flickr.com/photos/epsos/3384297473/ Jeepers creepers: http://www.flickr.com/photos/27663074@N07/3413698337/ Earth: http://www.flickr.com/photos/wwworks/2222523978/ Trafic light: http://rihancompany.com/var/243/35581-Traffic%20light%20drawing.jpg Griffon: http://aldaria02.a.l.pic.centerblog.net/lz2levrz.jpg Soap: http://www.flickr.com/photos/geishaboy500/104137788/ Disclaimer: http://4.bp.blogspot.com/_OyM252mHWvo/TT53ltKn7xI/AAAAAAAAC-A/YUNqmzfwce0/s1600/disclaimer.jpg.png 61

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n