Top Banner
© 2013 SpringOne 2GX. All rights reserved. Do not distribute without permission. Case Study - Grails in the Real World™ By Greg L. Turnquist Friday, September 13, 13
19
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Case Study - Using Grails in the Real World

© 2013 SpringOne 2GX. All rights reserved. Do not distribute without permission.

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

Friday, September 13, 13

Page 2: Case Study - Using Grails in the Real World

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

Page 3: Case Study - Using Grails in the Real World

Case Study - Grails in the Real World™

Questions?Keep ‘em coming!

Friday, September 13, 13

Page 4: Case Study - Using Grails in the Real World

Engage!

4Friday, September 13, 13

Page 5: Case Study - Using Grails in the Real World

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

Page 6: Case Study - Using Grails in the Real World

What does your app do?

6

Your project

Maven proxy server

Friday, September 13, 13

Page 7: Case Study - Using Grails in the Real World

Register by email

Easy to confirmEasy to updateEasy to manageBuilt in, out-of-band confirmation

Publicly visible emails susceptible to spamCorporate accounts recyclable

Friday, September 13, 13

Page 8: Case Study - Using Grails in the Real World

Register by email

Easy to confirmEasy to updateEasy to manageBuilt in, out-of-band confirmation

Publicly visible emails susceptible to spamCorporate accounts recyclable

Friday, September 13, 13

Page 9: Case Study - Using Grails in the Real World

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

Page 10: Case Study - Using Grails in the Real World

Plug in Spring Security

Friday, September 13, 13

Page 11: Case Study - Using Grails in the Real World

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

Page 12: Case Study - Using Grails in the Real World

Cache files in MongoDB’s GridFS

Friday, September 13, 13

Page 13: Case Study - Using Grails in the Real World

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

Page 14: Case Study - Using Grails in the Real World

Polish UI with Bootstrap + jQueryJunior developer:“I can build that!”

Senior developer:“Build that, someone else has.”

Friday, September 13, 13

Page 15: Case Study - Using Grails in the Real World

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

Page 16: Case Study - Using Grails in the Real World

Protect users from themselves

• 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!

Avoid bad data!

Friday, September 13, 13

Page 17: Case Study - Using Grails in the Real World

• Confirm registration by requiring re-entry of password• Send address updates to old & new addresses• Validate, validate, and validate!

Protect users from themselves

Friday, September 13, 13

Page 18: Case Study - Using Grails in the Real World

Case Study - Grails in the Real World™

Questions?

Friday, September 13, 13

Page 19: Case Study - Using Grails in the Real World

Thanks!

Twitter: twitter.com/gregturnCode: github.com/gregturn/grails-real-world

Learn More. Stay Connected.

Friday, September 13, 13