Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SpringOne 2GX 2013 Case Study: Grails in the Real World.pdf

Greg Turnquist
September 16, 2013

SpringOne 2GX 2013 Case Study: Grails in the Real World.pdf

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. spring @springcentral

Greg Turnquist

September 16, 2013
Tweet

More Decks by Greg Turnquist

Other Decks in Technology

Transcript

  1. © 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
  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. Case Study - Grails in the Real World™ Questions? Keep

    ‘em coming! Friday, September 13, 13
  4. 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
  5. What does your app do? 6 Your project Maven proxy

    server Friday, September 13, 13
  6. Register by email Easy to confirm Easy to update Easy

    to manage Built in, out-of- band confirmation Publicly visible emails susceptible to spam Corporate accounts recyclable Friday, September 13, 13
  7. Register by email Easy to confirm Easy to update Easy

    to manage Built in, out-of- band confirmation Publicly visible emails susceptible to spam Corporate accounts recyclable Friday, September 13, 13
  8. 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
  9. 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
  10. 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
  11. Polish UI with Bootstrap + jQuery Junior developer: “I can

    build that!” Senior developer: “Build that, someone else has.” Friday, September 13, 13
  12. 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
  13. 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
  14. • 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