Use all the buzzwords

1,306 views

Published on

Backbone JS Over Rails In The Cloud

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Use all the buzzwords

  1. 1. BACKBONE.JS OVER RAILS IN THE CLOUDJared Faris@jaredthenerdjared@jaredthenerd.com
  2. 2. ABOUT ME
  3. 3. LET’STELL A STORY!
  4. 4. OOPS
  5. 5. LEVEL 0 – ATTEMPT 2
  6. 6. RUBY ON RAILSYOU’VE FOUND RUBYAND ALSO RAILS
  7. 7. THE EASYWINS People write a lot of code for you Really easy to get started Great community support
  8. 8. THE LESS CLEARTHINGS “Open source” Why not Python? Why not .NET/Java/etc? “Automagic” breaks quickly Server-side is becoming less important
  9. 9. LEVEL 0 – COMPLETED
  10. 10. LEVEL 1– BUILDING ON RAILS• HAML (not ERB)• SASS (not CSS)• CoffeeScript (not JavaScript)• Ruby (not… ok, we kept Ruby)
  11. 11. HAML EXAMPLE
  12. 12. SASS EXAMPLE
  13. 13. SCSS EXAMPLE
  14. 14. AUTHS• Authentication• Authorization• Build or “Buy”Security
  15. 15. CANCAN EXAMPLE
  16. 16. OTHER GEMS• Redcarpet• Ruby OAuth• Braintree• Sendgrid• Paperclip• MongoidOther Gems
  17. 17. LEVEL 1 - COMPLETE
  18. 18. LEVEL 2 - DATABLACK MAGICAKA DATABASES
  19. 19. SCARY DBS• ORMs hide the database• Ruby’s automatic inclusion ofActiveRecord encourages little DBthought• Developers automatically buildrelational schemas• Black Mage has a cool hat
  20. 20. OUR DATA• Data frequently comes in isolatedsilos• Little of our data was traditionally“relational”• We could rebuild data sets later forreporting if we needed to• Scalability and ease of maintenancemattered heavily. We aren’t Ops folks
  21. 21. MONGO DB• Document store (NoSQL)• JavaScript based• Easy clustering• Run local and on serversMongoDB
  22. 22. MONGO QUERY EXAMPLE
  23. 23. MONGOID• ODM – Object Document Mapper• Maps Active Record interactions toMongoDB• Quit thinking about persistence andjust think about objectsMongoid
  24. 24. MONGOID QUERY EXAMPLE
  25. 25. LEVEL 3 – “JSON API”JSON API
  26. 26. JSON API EXAMPLE
  27. 27. JAVASCRIPT BITS• Templating• Objects for widgets• Namespacing
  28. 28. COFFEESCRIPTCOFFEESCRIPT
  29. 29. COFFEESCRIPT.ORG
  30. 30. LEVEL 4 - FRAMEWORKS• Started with jQuery• Added templates• Switched to Knockout• Ended up on Backbone• And then some Marionette
  31. 31. LEVEL 5 – DEV ENV
  32. 32. DEV ENV• Local development (local Rails,Mongo, etc)• Initially TeamCity for CI running ona VM• Fair bit of RSpec and Jasmine
  33. 33. GITHUB
  34. 34. TEAMCITY CRASHSwitched toSemaphoreVM CRASH!!!
  35. 35. SEMAPHORE
  36. 36. EC2 InstancesInternetSecurity GroupDNSResolutionLEVEL 6 - PRODUCTIONPRODUCTION
  37. 37. TOP RUBY RESOURCES• Ruby Koans• Ruby on Rails Guides• RailsCasts• Ruby Toolbox• Paid code reviews
  38. 38. TOP JS RESOURCES• JavaScript: The Good Parts• Backbone Koans• Derek Bailey’s blogs• Project homepages
  39. 39. WARP PIPE
  40. 40. Jared Faris@jaredthenerdjared@jaredthenerd.com

×