Off the Rails

Off the Rails

Rails is awesome, but it's not the best framework for building fat client web applications. I'll demonstrate why and how we've broken our Rails app into Angular client and thin API back end.

Presented: SoCal AngularJS meetup http://www.meetup.com/socal-angular/events/190913672/

36b118e795c80c058d942b7af047ea67?s=128

Alexander Tamoykin

August 07, 2014
Tweet

Transcript

  1. OFF THE RAILS Alex Tamoykin http://alextamoykin.com

  2. Hello I’m Alex Tamoykin

  3. AwesomenessTV Director of Engineering We’re hiring: eng-jobs@awesomenesstv.com

  4. The book author http://StartProgrammingNowBook.com

  5. Ping Pong Playa

  6. Enough bragging Let’s dive in

  7. What’s up • First version • Pain points • Break

    it
  8. Don’t forget about Angular, dude!!!

  9. First version Demo time!

  10. Get to MVP quickly • Simple deployment • Mature ecosystem

    • Team knows it
  11. Rails is Awesome! • For building web pages • aka

    documents
  12. Action -> Page -> ->

  13. We need more interactivity • Single Page • Interactive •

    Fast
  14. Something like an App

  15. Rails + Angular RAngular

  16. Pain points • =) • Interactive • Single Page •

    =( • Slow • Code organization
  17. View Rendering is slow

  18. Two apps in one repo

  19. Which one should I use ?

  20. Front End + Back End

  21. Hard to optimize

  22. Break it up HTTP Front End API Back End

  23. Bootstrap Front End

  24. Work to do

  25. Port views • grunt-haml plugin • Port rails views into

    Angular
  26. Integration test • Reimplement feature specs in javascript

  27. Get away from jQuery • use ng-class • custom directives

  28. Benefits

  29. Better code organization Front End Back End

  30. Faster visual feedback

  31. API for Mobile clients API

  32. But wait, there is more

  33. Front End • CDN • Angular template cache

  34. Back End ! • Lighter framework (Sinatra, node) • Different

    web server (Puma instead of unicorn)
  35. Because it’s separate

  36. Recap • First version • Pain points • Break it

  37. Thanks to the Team Dave Ferris (Dev) Meagan Cooney (Dev)

    Josh Book (Dev) Matt Levin (PM)
  38. Use the right tool for the job Takeaway

  39. http://alextamoykin.com