This document discusses how the Grails framework can help developers build applications for the modern web. It describes how Grails supports building rich client-side applications using technologies like HTML5, building for mobile with plugins, and connecting to social APIs. It also covers how Grails helps with challenges like scaling applications through the cloud, using NoSQL databases, and implementing CQRS patterns using event buses. The document provides examples of these concepts in action and outlines ideas for further enhancing the Grails platform.
3. HTML5.js
Web sites Applications
Server-side HTML Client-side HTML
Low interactivity High interactivity
No offline Offline
Wikipedia
3
4. HTML5.js
Web sites Applications
Server-side HTML Client-side HTML
Low interactivity High interactivity
No offline Offline
Twitter
4
5. HTML5.js
Web sites Applications
Server-side HTML Client-side HTML
Low interactivity High interactivity
No offline Offline
GMail
5
6. HTML5.js
We’re going this way!
Web sites Applications
Server-side HTML Client-side HTML
Low interactivity High interactivity
No offline Offline
Example:
REST + JSON
Backbone.js + Moustache
6
7. Google I/O 2012
400 million
Android activations to date
Apple WWDC 2012
365 million
iOS devices sold to date
7
23. How can Grails help - Social?
Simplified OAuth via OAuth plugin:
oauth {
providers {
twitter {
api = TwitterApi
key = 'my-key'
secret = 'my-secret'
successUri = '/'
failureUri = '/'
}
}
}
23
24. How can Grails help - Social?
<oauth:connect provider="twitter">
Connect to Twitter
</oauth:connect>
class MyService {
def oauthService
def myMethod() {
def twitterUsers = oauthService.getTwitterResource(
twitterAccessToken,
"http://api.yourprovider.com/users/list")
...
}
}
24
25. How can Grails help - NoSQL?
Accessible NoSQL via GORM
Domain Model
GORM
25
26. How can Grails help - Cloud?
Solve the caching problem with the Cache plugin
Cache plugin
Ehcache Redis
For HTTP sessions, Database Session plugin
Database Session plugin
MongoDB Cookie
26
48. Events
Spring Integration
Web Sockets (with emulation)
48
49. Summary
• The way applications are architected will change
– Websites will still be built (GSP not gone yet)
– Not everyone will need the same architecture
– Project archetypes and scaffolding!
• No single framework has everything you need
• Pick and choose the appropriate components for your
49
50. More info
• w: http://grails.org/
• f: http://grails.org/Mailing+Lists
• e: pledbrook@vmware.com
• t: pledbrook
• b: http://blog.springsource.com/author/peter-ledbrook/
50