Case Study - Grails in the Real World™
By Greg L. Turnquist

© 2013 SpringOne 2GX. All rights reserved. Do not distribute ...
Who am I?
•
•
•
•
•

Test-bitten script junky
Always looking for the right tool for the job
Founded Nashville JUG in 2010 ...
Case Study - Grails in the Real World™

Questions?
Keep ‘em coming!

Friday, September 13, 13
Engage!

4
Friday, September 13, 13
Case Study - Grails in the Real World™
§ Register by email
§ Plug in Spring Security
§ Code specialized REST endpoints
...
What does your app do?
Maven proxy server

Your project

6
Friday, September 13, 13
Register by email

Easy to confirm
Easy to update
Easy to manage
Built in, out-ofband confirmation

Friday, September 13, ...
Register by email

Easy to confirm
Easy to update
Easy to manage
Built in, out-ofband confirmation

Friday, September 13, ...
Plug in Spring Security
•
•
•
•
•

Easy to get started
Quickly tag backend services/controllers
Easily protect front end H...
Plug in Spring Security

Friday, September 13, 13
Code specialized REST endpoints
• Easy to create custom endpoints
– Edit UrlMappings.groovy

• Pick your strategy
– Hashed...
Cache files in MongoDB’s GridFS

Friday, September 13, 13
Cache files in MongoDB’s GridFS
•
•
•
•

Stash downloaded files in GridFS
Speed up user experience
Groovy makes GridFS API...
Polish UI with Bootstrap + jQuery
Junior developer:
“I can build that!”

Senior developer:
“Build that, someone else has.”...
Polish UI with Bootstrap + jQuery
•
•
•
•

Bootstrap + jQuery make me look good!
Use HTML5 form validation features
Find t...
Protect users from themselves
Avoid bad data!

• Double up on customer data inputs
• Consider buying “good data”
– Nationw...
Protect users from themselves
• Confirm registration by requiring re-entry of password
• Send address updates to old & new...
Case Study - Grails in the Real World™

Questions?

Friday, September 13, 13
Learn More. Stay Connected.

Thanks!
Twitter: twitter.com/gregturn
Code: github.com/gregturn/grails-real-world

Friday, Se...
Upcoming SlideShare
Loading in …5
×

Case Study - Using Grails in the Real World

1,288 views
1,138 views

Published on

Speaker: Greg Turnquist
We all know how to code various patterns of behavior. But when your app needs to be used in the Real World(tm), there are certain things that are key.
In this talk, we'll walk through a production-grade Grails application that includes the following characteristics:
Email-driven user registration combined with "forgot my password" and "update my email" techniques, all using Spring Mail
Plugging in Spring Security to easily protect pages and only show appropriate links
Coding specialized REST endpoints to serve authorized files to the client through this app
Caching these files in Mongo's GridFS
Polishing the look & feel using Twitter Boostrap and jQuery
UI tactics to protect users from themselves (and reduce calls to your support center!)

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
1,288
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Case Study - Using Grails in the Real World

  1. 1. Case Study - Grails in the Real World™ By Greg L. Turnquist © 2013 SpringOne 2GX. All rights reserved. Do not distribute without permission. Friday, September 13, 13
  2. 2. Who am I? • • • • • Test-bitten script junky Always looking for the right tool for the job Founded Nashville JUG in 2010 (almost 300 members) Created Spring Python in 2006 Author of Spring Python 1.1 and Python Testing Cookbook and reviewed several others • Twitter: @gregturn • Blog: GregLTurnquist.com Friday, September 13, 13
  3. 3. Case Study - Grails in the Real World™ Questions? Keep ‘em coming! Friday, September 13, 13
  4. 4. Engage! 4 Friday, September 13, 13
  5. 5. Case Study - Grails in the Real World™ § Register by email § Plug in Spring Security § Code specialized REST endpoints § Cache files with MongoDB’s GridFS § Polish UI with Bootstrap + jQuery § Protect users from themselves Friday, September 13, 13
  6. 6. What does your app do? Maven proxy server Your project 6 Friday, September 13, 13
  7. 7. Register by email Easy to confirm Easy to update Easy to manage Built in, out-ofband confirmation Friday, September 13, 13 Publicly visible emails susceptible to spam Corporate accounts recyclable
  8. 8. Register by email Easy to confirm Easy to update Easy to manage Built in, out-ofband confirmation Friday, September 13, 13 Publicly visible emails susceptible to spam Corporate accounts recyclable
  9. 9. Plug in Spring Security • • • • • Easy to get started Quickly tag backend services/controllers Easily protect front end HTML with <sec> tags Well supported by community and books Corporate backing Friday, September 13, 13
  10. 10. Plug in Spring Security Friday, September 13, 13
  11. 11. Code specialized REST endpoints • Easy to create custom endpoints – Edit UrlMappings.groovy • Pick your strategy – Hashed values or authenticated endpoint? • BTW: Grails 2.3 may render some of this obsolete – Comes with new built-in conventions – But...if you do something different, can always add it on! Friday, September 13, 13
  12. 12. Cache files in MongoDB’s GridFS Friday, September 13, 13
  13. 13. Cache files in MongoDB’s GridFS • • • • Stash downloaded files in GridFS Speed up user experience Groovy makes GridFS API a snap to use Implement FIFO - First In First Out Friday, September 13, 13
  14. 14. Polish UI with Bootstrap + jQuery Junior developer: “I can build that!” Senior developer: “Build that, someone else has.” Friday, September 13, 13
  15. 15. Polish UI with Bootstrap + jQuery • • • • Bootstrap + jQuery make me look good! Use HTML5 form validation features Find themes. It’s okay to pay for good ones! Hire a top quality UI person Friday, September 13, 13
  16. 16. Protect users from themselves Avoid bad data! • Double up on customer data inputs • Consider buying “good data” – Nationwide address list, zip codes, CLLI/LID/ FAC database – Steer users towards this data with prompts • Assume the worst • Having a demented team member can help! Friday, September 13, 13
  17. 17. Protect users from themselves • Confirm registration by requiring re-entry of password • Send address updates to old & new addresses • Validate, validate, and validate! Friday, September 13, 13
  18. 18. Case Study - Grails in the Real World™ Questions? Friday, September 13, 13
  19. 19. Learn More. Stay Connected. Thanks! Twitter: twitter.com/gregturn Code: github.com/gregturn/grails-real-world Friday, September 13, 13

×