Frontend Choices

Frontend Choices

9b1a71682de14fc6fc2b944a9c4814a0?s=128

Alex Coles

March 16, 2014
Tweet

Transcript

  1. Frontend choices Alex Coles | wroc_love.rb, Wrocław, Polska

  2. Anti-climax

  3. front end vs. frontend

  4. Not really about choice

  5. ‘I’m a backend guy living in a frontend world’

  6. About me

  7. @myabc Alex Coles Berlin, Germany Finn GmbH

  8. OpenProject openproject.org

  9. 1..2..3

  10. eurucamp eurucamp.org Call for Papers open until 1st May

  11. 1..2..3

  12. jeden one: background

  13. Single page v traditional HTML

  14. SPA depends on your content

  15. no kupa, Sherlock

  16. What’s your content? Information Pages Membership sites Closed Systems

  17. Content Criteria • Authentication • Caching • Indexing (SEO) •

    curated Content vs Dynamic
  18. dwa two: where we are now

  19. History of the Rails Interface

  20. “Rails is so 2005”

  21. “Rails Way” back in 2005 • Server Generated HTML (ERB,

    etc.) • Prototype • Scriptaculous • RJS
  22. “Rails Way” now • Server Generated HTML (ERB, Slim, HAML

    etc.) • jQuery • jQuery UI • Server generated JavaScript Responses (SJR)
  23. Where we are now

  24. JavaScript is HUGE

  25. No backend nobackend.org

  26. Hoodie hood.ie

  27. Meteor www.meteor.com

  28. but I <3 Ruby

  29. So here’s the question

  30. None
  31. Room for Rails?

  32. The Rails Way

  33. – Marcin Stecki @madsheep at wroc_love.rb “Not his [DHH]'s responsibility

    to tell us how to do these things.”
  34. Frontend frameworks

  35. Frontend (MV*) frameworks • AngularJS • Ember.js • KnockoutJS

  36. Frontend (component) frameworks • ReactJS • Backbone.View (alone) • ExtJS

  37. TodoMVC todomvc.com

  38. KnockoutJS

  39. AngularJS

  40. Ember.js

  41. What is most like Rails?

  42. Ember.js is most like Rails • Everything should inherit from

    Ember.Object
 (think ActiveRecord::Base.inherited) • Routing DSL • Vocabulary (templates, partials, etc.)
  43. trzy three: practical usage

  44. Using asset pipeline / sprockets

  45. Use Bower

  46. gem install bower-rails

  47. Rails 4 (Sprockets 2+)

  48. config.assets.paths << File.join(Rails.root, 'vendor', 'assets', ‘components')

  49. ember-rails-api github.com/dockyard/ember-appkit-rails

  50. None
  51. What is the way forward?

  52. Split Completely

  53. Two applications: one API, one frontend

  54. Rails or Sinatra for API
 A JS workflow for Frontend

  55. Surprisingly testable (and fast)

  56. Dzięki!

  57. Questions?

  58. @myabc