GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook

on

  • 2,738 views

 

Statistics

Views

Total Views
2,738
Views on SlideShare
2,253
Embed Views
485

Actions

Likes
0
Downloads
36
Comments
0

6 Embeds 485

http://blog.helyx.org 473
http://universegroovygrails.blogspot.com 4
http://feeds.feedburner.com 4
http://feeds2.feedburner.com 2
url_unknown 1
http://www.eu2011.gr8conf.org 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

GR8Conf 2011: Grails 1.4 Update by Peter Ledbrook Presentation Transcript

  • 1. Grails Update Peter LedbrookMonday, 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. 2Monday, 30 May 2011 2
  • 3. New users 3Monday, 30 May 2011 3
  • 4. Grails 1.4 • Groovy 1.8 • Spring 3.1 • Hibernate 3.6 • Tomcat 7 • Prototype => jQuery 4Monday, 30 May 2011 4
  • 5. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 5Monday, 30 May 2011 5
  • 6. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 6Monday, 30 May 2011 6
  • 7. GORM API • Plugins should not assume Hibernate! 7Monday, 30 May 2011 7
  • 8. SQL database migration Hibernate ‘update’ + Production data = ? 8Monday, 30 May 2011 8
  • 9. SQL database migration Liquibase Database Migration + Plugin Autobase 9Monday, 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 10Monday, 30 May 2011 10
  • 11. SQL reverse engineering install-plugin db-reverse-engineer class Person { String name Integer age ... } 11Monday, 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) } 12Monday, 30 May 2011 12
  • 13. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 13Monday, 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 14Monday, 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() ... } } 15Monday, 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() ... } } 16Monday, 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() ... } } 17Monday, 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() ... } } 18Monday, 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() ... } } 19Monday, 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! 20Monday, 30 May 2011 20
  • 21. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 21Monday, 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? 22Monday, 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) 23Monday, 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 24Monday, 30 May 2011 24
  • 25. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 25Monday, 30 May 2011 25
  • 26. 26Monday, 30 May 2011 26
  • 27. Grails 1.4 • Data storage • Better testing • User experience • A better look • A truly collaborative effort 27Monday, 30 May 2011 27
  • 28. Contributors Marc Palmer Resources 28Monday, 30 May 2011 28
  • 29. Contributors Rob Fletcher Scaffolding & jQuery 29Monday, 30 May 2011 29
  • 30. Contributors Stéphane Maldini AST Magic 30Monday, 30 May 2011 30
  • 31. Contributors Luke Daley Snapshot deps & testing 31Monday, 30 May 2011 31
  • 32. Contributors Jonathan Pearlin Maven 32Monday, 30 May 2011 32
  • 33. Contributors Kim Betti JUnit Test Reports 33Monday, 30 May 2011 33
  • 34. Contributors 34Monday, 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 35Monday, 30 May 2011 35
  • 36. Grails in the cloud ? 36Monday, 30 May 2011 36
  • 37. For the future • A continued focus on – Reliability – User experience – Modularity – More cloud 37Monday, 30 May 2011 37
  • 38. Thank you! Questions? 38Monday, 30 May 2011 38