0
Grails Update                       Peter LedbrookMonday, 30 May 2011                     1
Past year     • Grails 1.3 line          – Plugins in dependency DSL     • More and more plugins          – Spring Securit...
New users                      3Monday, 30 May 2011       3
Grails 1.4     • Groovy 1.8     • Spring 3.1     • Hibernate 3.6     • Tomcat 7     • Prototype => jQuery                 ...
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
GORM API     • Plugins should not assume Hibernate!                                              7Monday, 30 May 2011     ...
SQL database migration                      Hibernate ‘update’                              +                       Produc...
SQL database migration                          Liquibase                      Database Migration                         ...
SQL database migration                      Pre-production, Hibernate ‘update’ or ‘create-drop’                           ...
SQL reverse engineering                      install-plugin db-reverse-engineer                                           ...
Other database stuff     • Abstract base domain classes          – These now result in a table     • findOrCreateWhere()  ...
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
Unit testing pre-1.4     • mockDomainClass() had only partial GORM support          – always lagged changes in GORM     • ...
The mixin approach      class MyControllerUnitTests extends ControllerUnitTestCase {          void setUp() {              ...
The mixin approach      class MyControllerUnitTests {          void setUp() {              mockDomain(Person, [           ...
The mixin approach      @TestFor(MyController)      @Mock(Person)      class MyControllerUnitTests {          void setUp()...
The mixin approach      @TestFor(MyController)      @Mock(Person)      class MyControllerUnitTests {          void setUp()...
The mixin approach (optional)      @TestFor(MyController)      @Mock(Person)      class MyControllerUnitTests {          @...
Support for testing...     •   Tag libraries     •   Command objects     •   XML & JSON responses     •   File upload     ...
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
New automatic reloading     • Reloading in run-app works with          – Typed service references          – Domain classe...
Plugin portal                + Plugin usage tracking                + Grails usage tracking                + More info abo...
Other stuff     • Snapshot handling fixed          – No need to clear Ivy cache when new snapshot available     • Interact...
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
26Monday, 30 May 2011        26
Grails 1.4     • Data storage     • Better testing     • User experience     • A better look     • A truly collaborative e...
Contributors                      Marc Palmer                      Resources                                    28Monday, ...
Contributors       Rob Fletcher       Scaffolding &       jQuery                       29Monday, 30 May 2011         29
Contributors                      Stéphane                      Maldini                      AST Magic                    ...
Contributors         Luke Daley         Snapshot deps         & testing                         31Monday, 30 May 2011     ...
Contributors                      Jonathan                      Pearlin                      Maven                        ...
Contributors         Kim Betti         JUnit Test         Reports                      33Monday, 30 May 2011        33
Contributors                      34Monday, 30 May 2011        34
Other contributions     •   60+ pull requests on grails-core     •   35+ pull requests on grails-docs     •   More and mor...
Grails in the cloud                           ?                               36Monday, 30 May 2011                 36
For the future     • A continued focus on          – Reliability          – User experience          – Modularity         ...
Thank you!                       Questions?                                    38Monday, 30 May 2011                      38
Upcoming SlideShare
Loading in...5
×

GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook

2,442

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
2,442
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
37
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook"

  1. 1. Grails Update Peter LedbrookMonday, 30 May 2011 1
  2. 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. 2Monday, 30 May 2011 2
  3. 3. New users 3Monday, 30 May 2011 3
  4. 4. Grails 1.4 • Groovy 1.8 • Spring 3.1 • Hibernate 3.6 • Tomcat 7 • Prototype => jQuery 4Monday, 30 May 2011 4
  5. 5. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 5Monday, 30 May 2011 5
  6. 6. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 6Monday, 30 May 2011 6
  7. 7. GORM API • Plugins should not assume Hibernate! 7Monday, 30 May 2011 7
  8. 8. SQL database migration Hibernate ‘update’ + Production data = ? 8Monday, 30 May 2011 8
  9. 9. SQL database migration Liquibase Database Migration + Plugin Autobase 9Monday, 30 May 2011 9
  10. 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 10Monday, 30 May 2011 10
  11. 11. SQL reverse engineering install-plugin db-reverse-engineer class Person { String name Integer age ... } 11Monday, 30 May 2011 11
  12. 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) } 12Monday, 30 May 2011 12
  13. 13. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 13Monday, 30 May 2011 13
  14. 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 14Monday, 30 May 2011 14
  15. 15. The mixin approach class MyControllerUnitTests extends ControllerUnitTestCase { void setUp() { mockDomain(Person, [ new Person(...), new Person(...) ]) } void testIndex() { def model = this.controller.index() ... } } 15Monday, 30 May 2011 15
  16. 16. The mixin approach class MyControllerUnitTests { void setUp() { mockDomain(Person, [ new Person(...), new Person(...) ]) } void testIndex() { def model = this.controller.index() ... } } 16Monday, 30 May 2011 16
  17. 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() ... } } 17Monday, 30 May 2011 17
  18. 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() ... } } 18Monday, 30 May 2011 18
  19. 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() ... } } 19Monday, 30 May 2011 19
  20. 20. Support for testing... • Tag libraries • Command objects • XML & JSON responses • File upload • View and template rendering • Filters • URL mappings • Criteria queries • and more! 20Monday, 30 May 2011 20
  21. 21. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 21Monday, 30 May 2011 21
  22. 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? 22Monday, 30 May 2011 22
  23. 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) 23Monday, 30 May 2011 23
  24. 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 24Monday, 30 May 2011 24
  25. 25. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 25Monday, 30 May 2011 25
  26. 26. 26Monday, 30 May 2011 26
  27. 27. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 27Monday, 30 May 2011 27
  28. 28. Contributors Marc Palmer Resources 28Monday, 30 May 2011 28
  29. 29. Contributors Rob Fletcher Scaffolding & jQuery 29Monday, 30 May 2011 29
  30. 30. Contributors Stéphane Maldini AST Magic 30Monday, 30 May 2011 30
  31. 31. Contributors Luke Daley Snapshot deps & testing 31Monday, 30 May 2011 31
  32. 32. Contributors Jonathan Pearlin Maven 32Monday, 30 May 2011 32
  33. 33. Contributors Kim Betti JUnit Test Reports 33Monday, 30 May 2011 33
  34. 34. Contributors 34Monday, 30 May 2011 34
  35. 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 35Monday, 30 May 2011 35
  36. 36. Grails in the cloud ? 36Monday, 30 May 2011 36
  37. 37. For the future • A continued focus on – Reliability – User experience – Modularity – More cloud 37Monday, 30 May 2011 37
  38. 38. Thank you! Questions? 38Monday, 30 May 2011 38
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×