SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Grails Update


                       Peter Ledbrook




Monday, 30 May 2011                     1
Past year

     • Grails 1.3 line
          – Plugins in dependency DSL
     • More and more plugins
          – Spring Security Core et al.
          – RabbitMQ
          – Gemfire
          – Resources, etc.
     • noSQL
          – Redis, MongoDB, Riak, etc.




                                          2

Monday, 30 May 2011                           2
New users




                      3

Monday, 30 May 2011       3
Grails 1.4

     • Groovy 1.8
     • Spring 3.1
     • Hibernate 3.6
     • Tomcat 7
     • Prototype => jQuery

                             4

Monday, 30 May 2011              4
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      5

Monday, 30 May 2011                       5
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      6

Monday, 30 May 2011                       6
GORM API




     • Plugins should not assume Hibernate!

                                              7

Monday, 30 May 2011                               7
SQL database migration


                      Hibernate ‘update’
                              +
                       Production data
                              =

                              ?


                                           8

Monday, 30 May 2011                            8
SQL database migration




                          Liquibase
                      Database Migration
                              +
                           Plugin
                          Autobase



                                           9

Monday, 30 May 2011                            9
SQL database migration

                      Pre-production, Hibernate ‘update’ or ‘create-drop’



                                   dbm-generate-changelog
                                     dbm-changelog-sync



                                    Change domain model



                                        dbm-gorm-diff
                                         dbm-update


                                                                            10

Monday, 30 May 2011                                                              10
SQL reverse engineering

                      install-plugin db-reverse-engineer




                                              class Person {
                                                  String name
                                                  Integer age
                                                  ...
                                              }




                                                                11

Monday, 30 May 2011                                                  11
Other database stuff

     • Abstract base domain classes
          – These now result in a table
     • findOrCreateWhere()
     • findOrSaveWhere()
     def user = User.findByLogin('admin')
     if (!user) {
     def user = User.findOrSaveWhere(login: 'admin')
         user = new User(login: 'admin')
         user.save(failOnError: true)
     }




                                                      12

Monday, 30 May 2011                                        12
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      13

Monday, 30 May 2011                        13
Unit testing pre-1.4

     • mockDomainClass() had only partial GORM support
          – always lagged changes in GORM
     • Inheritance-based
          – hierarchy duplicated for Spock
          – difficult to extend
     • Weak support for web-related testing
          – controllers
          – tag libraries




                                                         14

Monday, 30 May 2011                                           14
The mixin approach


      class MyControllerUnitTests extends ControllerUnitTestCase {
          void setUp() {
              mockDomain(Person, [
                      new Person(...),
                      new Person(...) ])
          }

               void testIndex() {
                   def model = this.controller.index()
                   ...
               }
      }




                                                                     15

Monday, 30 May 2011                                                       15
The mixin approach


      class MyControllerUnitTests {
          void setUp() {
              mockDomain(Person, [
                      new Person(...),
                      new Person(...) ])
          }

               void testIndex() {
                   def model = this.controller.index()
                   ...
               }
      }




                                                         16

Monday, 30 May 2011                                           16
The mixin approach
      @TestFor(MyController)
      @Mock(Person)
      class MyControllerUnitTests {
          void setUp() {
              mockDomain(Person, [
                      new Person(...),
                      new Person(...) ])
          }

               void testIndex() {
                   def model = this.controller.index()
                   ...
               }
      }




                                                         17

Monday, 30 May 2011                                           17
The mixin approach
      @TestFor(MyController)
      @Mock(Person)
      class MyControllerUnitTests {
          void setUp() {
              new Person(...).save()
              new Person(...).save()
          }

               void testIndex() {
                   def model = this.controller.index()
                   ...
               }
      }




                                                         18

Monday, 30 May 2011                                           18
The mixin approach (optional)
      @TestFor(MyController)
      @Mock(Person)
      class MyControllerUnitTests {
          @Before
          void before() {
              new Person(...).save()
              new Person(...).save()
          }

               @Test
               void indexAction() {
                   def model = this.controller.index()
                   ...
               }
      }




                                                         19

Monday, 30 May 2011                                           19
Support for testing...

     •   Tag libraries
     •   Command objects
     •   XML & JSON responses
     •   File upload
     •   View and template rendering
     •   Filters
     •   URL mappings
     •   Criteria queries
     •   and more!




                                       20

Monday, 30 May 2011                         20
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      21

Monday, 30 May 2011                        21
New automatic reloading

     • Reloading in run-app works with
          – Typed service references
          – Domain classes
          – src/groovy, src/java
     • Any command with -agent
     • Interactive mode and integration tests?




                                                 22

Monday, 30 May 2011                                   22
Plugin portal


                + Plugin usage tracking
                + Grails usage tracking
                + More info about plugins
                How many We don’t know plugin?
                           people use each
                      Licence
                      Developers
                      Issue tracker
                      SCM
                      Dependencies (JAR & plugin)


                                                    23

Monday, 30 May 2011                                      23
Other stuff

     • Snapshot handling fixed
          – No need to clear Ivy cache when new snapshot available
     • Interactive mode
          – Eliminate Permgen errors?
     • H2 console
          – Out of the box interrogation of database
     • Binary plugins
          – Plugins as JAR dependencies!
     • AST transforms
          – Use domain classes from Java!
          – Real ‘errors’ and ‘log’ properties!
     • Public methods on controllers == actions

                                                                     24

Monday, 30 May 2011                                                       24
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      25

Monday, 30 May 2011                        25
26

Monday, 30 May 2011        26
Grails 1.4

     • Data storage
     • Better testing
     • User experience
     • A better look
     • A truly collaborative effort

                                      27

Monday, 30 May 2011                        27
Contributors




                      Marc Palmer

                      Resources




                                    28

Monday, 30 May 2011                      28
Contributors




       Rob Fletcher

       Scaffolding &
       jQuery



                       29

Monday, 30 May 2011         29
Contributors




                      Stéphane
                      Maldini

                      AST Magic




                                  30

Monday, 30 May 2011                    30
Contributors




         Luke Daley

         Snapshot deps
         & testing



                         31

Monday, 30 May 2011           31
Contributors




                      Jonathan
                      Pearlin

                      Maven



                                 32

Monday, 30 May 2011                   32
Contributors




         Kim Betti

         JUnit Test
         Reports




                      33

Monday, 30 May 2011        33
Contributors




                      34

Monday, 30 May 2011        34
Other contributions

     •   60+ pull requests on grails-core
     •   35+ pull requests on grails-docs
     •   More and more plugins
     •   GitHub for the win!
          – grails-core
          – grails-docs
          – grails-website
          – grails-maven
          – and many, many plugins




                                            35

Monday, 30 May 2011                              35
Grails in the cloud




                           ?
                               36

Monday, 30 May 2011                 36
For the future

     • A continued focus on
          – Reliability
          – User experience
          – Modularity
          – More cloud

                              37

Monday, 30 May 2011                37
Thank you!

                       Questions?




                                    38

Monday, 30 May 2011                      38

Weitere ähnliche Inhalte

Andere mochten auch

GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
GR8Conf
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
GR8Conf
 
GR8Conf 2011: CodeNarc and GMetrics
GR8Conf 2011: CodeNarc and GMetricsGR8Conf 2011: CodeNarc and GMetrics
GR8Conf 2011: CodeNarc and GMetrics
GR8Conf
 
Developing Mobile HTML5 Apps with Grails
Developing Mobile HTML5 Apps with GrailsDeveloping Mobile HTML5 Apps with Grails
Developing Mobile HTML5 Apps with Grails
GR8Conf
 
Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1
Ricardo Quintero
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
mewaseem
 

Andere mochten auch (13)

GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
 
GR8Conf 2011: CodeNarc and GMetrics
GR8Conf 2011: CodeNarc and GMetricsGR8Conf 2011: CodeNarc and GMetrics
GR8Conf 2011: CodeNarc and GMetrics
 
Developing Mobile HTML5 Apps with Grails
Developing Mobile HTML5 Apps with GrailsDeveloping Mobile HTML5 Apps with Grails
Developing Mobile HTML5 Apps with Grails
 
Idiomatic spock
Idiomatic spockIdiomatic spock
Idiomatic spock
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Mum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developerMum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developer
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with Groovy
 
Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle
 
Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 

Ähnlich wie GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook

GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter LedbrookGR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf
 
Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)
ecommerce poland expo
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
Tomek Kaczanowski
 

Ähnlich wie GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook (20)

GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter LedbrookGR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
 
Robotlegs Introduction
Robotlegs IntroductionRobotlegs Introduction
Robotlegs Introduction
 
Introduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightIntroduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylight
 
MarsJUG - Une nouvelle vision des tests avec Arquillian
MarsJUG - Une nouvelle vision des tests avec ArquillianMarsJUG - Une nouvelle vision des tests avec Arquillian
MarsJUG - Une nouvelle vision des tests avec Arquillian
 
Mini training - Moving to xUnit.net
Mini training - Moving to xUnit.netMini training - Moving to xUnit.net
Mini training - Moving to xUnit.net
 
Junit mockito and PowerMock in Java
Junit mockito and  PowerMock in JavaJunit mockito and  PowerMock in Java
Junit mockito and PowerMock in Java
 
Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
Easy Java Integration Testing with Testcontainers​
Easy Java Integration Testing with Testcontainers​Easy Java Integration Testing with Testcontainers​
Easy Java Integration Testing with Testcontainers​
 
Generating characterization tests for legacy code
Generating characterization tests for legacy codeGenerating characterization tests for legacy code
Generating characterization tests for legacy code
 
Unit testing basic
Unit testing basicUnit testing basic
Unit testing basic
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
 
Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
 
Continuous Integration and Drupal
Continuous Integration and DrupalContinuous Integration and Drupal
Continuous Integration and Drupal
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with Mule
 
Art of unit testing: How developer should care about code quality
Art of unit testing: How developer should care about code qualityArt of unit testing: How developer should care about code quality
Art of unit testing: How developer should care about code quality
 
NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...
NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...
NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
 
Drizzle 7.0, Future of Virtualizing
Drizzle 7.0, Future of VirtualizingDrizzle 7.0, Future of Virtualizing
Drizzle 7.0, Future of Virtualizing
 

Mehr von GR8Conf

Mehr von GR8Conf (20)

DevOps Enabling Your Team
DevOps Enabling Your TeamDevOps Enabling Your Team
DevOps Enabling Your Team
 
Scraping with Geb
Scraping with GebScraping with Geb
Scraping with Geb
 
How to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and AndroidHow to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and Android
 
Ratpack On the Docks
Ratpack On the DocksRatpack On the Docks
Ratpack On the Docks
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Code
 
Cut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsCut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature plugins
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
Ratpack and Grails 3
 Ratpack and Grails 3 Ratpack and Grails 3
Ratpack and Grails 3
 
Grails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloudGrails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloud
 
Functional testing your Grails app with GEB
Functional testing your Grails app with GEBFunctional testing your Grails app with GEB
Functional testing your Grails app with GEB
 
Deploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPCDeploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPC
 
The Grails introduction workshop
The Grails introduction workshopThe Grails introduction workshop
The Grails introduction workshop
 
The Groovy Ecosystem Revisited
The Groovy Ecosystem RevisitedThe Groovy Ecosystem Revisited
The Groovy Ecosystem Revisited
 
Groovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGroovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examples
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and Groovy
 
CRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual MachineCRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual Machine
 
Grooscript gr8conf
Grooscript gr8confGrooscript gr8conf
Grooscript gr8conf
 
CRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual MachineCRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual Machine
 
Jan reher may 2013
Jan reher may 2013Jan reher may 2013
Jan reher may 2013
 
Good Form - complex web forms made Groovy
Good Form - complex web forms made GroovyGood Form - complex web forms made Groovy
Good Form - complex web forms made Groovy
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook

  • 1. Grails Update Peter Ledbrook Monday, 30 May 2011 1
  • 2. Past year • Grails 1.3 line – Plugins in dependency DSL • More and more plugins – Spring Security Core et al. – RabbitMQ – Gemfire – Resources, etc. • noSQL – Redis, MongoDB, Riak, etc. 2 Monday, 30 May 2011 2
  • 3. New users 3 Monday, 30 May 2011 3
  • 4. Grails 1.4 • Groovy 1.8 • Spring 3.1 • Hibernate 3.6 • Tomcat 7 • Prototype => jQuery 4 Monday, 30 May 2011 4
  • 5. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 5 Monday, 30 May 2011 5
  • 6. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 6 Monday, 30 May 2011 6
  • 7. GORM API • Plugins should not assume Hibernate! 7 Monday, 30 May 2011 7
  • 8. SQL database migration Hibernate ‘update’ + Production data = ? 8 Monday, 30 May 2011 8
  • 9. SQL database migration Liquibase Database Migration + Plugin Autobase 9 Monday, 30 May 2011 9
  • 10. SQL database migration Pre-production, Hibernate ‘update’ or ‘create-drop’ dbm-generate-changelog dbm-changelog-sync Change domain model dbm-gorm-diff dbm-update 10 Monday, 30 May 2011 10
  • 11. SQL reverse engineering install-plugin db-reverse-engineer class Person { String name Integer age ... } 11 Monday, 30 May 2011 11
  • 12. Other database stuff • Abstract base domain classes – These now result in a table • findOrCreateWhere() • findOrSaveWhere() def user = User.findByLogin('admin') if (!user) { def user = User.findOrSaveWhere(login: 'admin') user = new User(login: 'admin') user.save(failOnError: true) } 12 Monday, 30 May 2011 12
  • 13. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 13 Monday, 30 May 2011 13
  • 14. Unit testing pre-1.4 • mockDomainClass() had only partial GORM support – always lagged changes in GORM • Inheritance-based – hierarchy duplicated for Spock – difficult to extend • Weak support for web-related testing – controllers – tag libraries 14 Monday, 30 May 2011 14
  • 15. The mixin approach class MyControllerUnitTests extends ControllerUnitTestCase { void setUp() { mockDomain(Person, [ new Person(...), new Person(...) ]) } void testIndex() { def model = this.controller.index() ... } } 15 Monday, 30 May 2011 15
  • 16. The mixin approach class MyControllerUnitTests { void setUp() { mockDomain(Person, [ new Person(...), new Person(...) ]) } void testIndex() { def model = this.controller.index() ... } } 16 Monday, 30 May 2011 16
  • 17. The mixin approach @TestFor(MyController) @Mock(Person) class MyControllerUnitTests { void setUp() { mockDomain(Person, [ new Person(...), new Person(...) ]) } void testIndex() { def model = this.controller.index() ... } } 17 Monday, 30 May 2011 17
  • 18. The mixin approach @TestFor(MyController) @Mock(Person) class MyControllerUnitTests { void setUp() { new Person(...).save() new Person(...).save() } void testIndex() { def model = this.controller.index() ... } } 18 Monday, 30 May 2011 18
  • 19. The mixin approach (optional) @TestFor(MyController) @Mock(Person) class MyControllerUnitTests { @Before void before() { new Person(...).save() new Person(...).save() } @Test void indexAction() { def model = this.controller.index() ... } } 19 Monday, 30 May 2011 19
  • 20. Support for testing... • Tag libraries • Command objects • XML & JSON responses • File upload • View and template rendering • Filters • URL mappings • Criteria queries • and more! 20 Monday, 30 May 2011 20
  • 21. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 21 Monday, 30 May 2011 21
  • 22. New automatic reloading • Reloading in run-app works with – Typed service references – Domain classes – src/groovy, src/java • Any command with -agent • Interactive mode and integration tests? 22 Monday, 30 May 2011 22
  • 23. Plugin portal + Plugin usage tracking + Grails usage tracking + More info about plugins How many We don’t know plugin? people use each Licence Developers Issue tracker SCM Dependencies (JAR & plugin) 23 Monday, 30 May 2011 23
  • 24. Other stuff • Snapshot handling fixed – No need to clear Ivy cache when new snapshot available • Interactive mode – Eliminate Permgen errors? • H2 console – Out of the box interrogation of database • Binary plugins – Plugins as JAR dependencies! • AST transforms – Use domain classes from Java! – Real ‘errors’ and ‘log’ properties! • Public methods on controllers == actions 24 Monday, 30 May 2011 24
  • 25. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 25 Monday, 30 May 2011 25
  • 26. 26 Monday, 30 May 2011 26
  • 27. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 27 Monday, 30 May 2011 27
  • 28. Contributors Marc Palmer Resources 28 Monday, 30 May 2011 28
  • 29. Contributors Rob Fletcher Scaffolding & jQuery 29 Monday, 30 May 2011 29
  • 30. Contributors Stéphane Maldini AST Magic 30 Monday, 30 May 2011 30
  • 31. Contributors Luke Daley Snapshot deps & testing 31 Monday, 30 May 2011 31
  • 32. Contributors Jonathan Pearlin Maven 32 Monday, 30 May 2011 32
  • 33. Contributors Kim Betti JUnit Test Reports 33 Monday, 30 May 2011 33
  • 34. Contributors 34 Monday, 30 May 2011 34
  • 35. Other contributions • 60+ pull requests on grails-core • 35+ pull requests on grails-docs • More and more plugins • GitHub for the win! – grails-core – grails-docs – grails-website – grails-maven – and many, many plugins 35 Monday, 30 May 2011 35
  • 36. Grails in the cloud ? 36 Monday, 30 May 2011 36
  • 37. For the future • A continued focus on – Reliability – User experience – Modularity – More cloud 37 Monday, 30 May 2011 37
  • 38. Thank you! Questions? 38 Monday, 30 May 2011 38