Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Frontend Choices
Alex Coles
March 16, 2014
Technology
0
190
Frontend Choices
Alex Coles
March 16, 2014
Tweet
Share
More Decks by Alex Coles
See All by Alex Coles
myabc
0
38
myabc
0
63
myabc
0
29
myabc
0
60
myabc
1
370
myabc
1
230
myabc
0
37
myabc
1
190
myabc
2
180
Other Decks in Technology
See All in Technology
ocise
0
130
yuyaabo
0
260
humank
0
220
suzukiry
0
210
stakaya
11
7.1k
yokatsuki
1
190
ray_30cm_ns
0
280
hsano
0
130
yosuke_matsuura
PRO
0
3.3k
110y
3
730
unifa_dev
0
360
y0hgi
1
380
Featured
See All Featured
edds
56
9.3k
samanthasiow
56
6.3k
phodgson
87
3.9k
kneath
294
39k
eitanlees
111
9.9k
philnash
8
490
denniskardys
220
120k
qrush
285
18k
jponch
103
5k
philhawksworth
190
17k
bkeepers
321
53k
jonrohan
1021
380k
Transcript
Frontend choices Alex Coles | wroc_love.rb, Wrocław, Polska
Anti-climax
front end vs. frontend
Not really about choice
‘I’m a backend guy living in a frontend world’
About me
@myabc Alex Coles Berlin, Germany Finn GmbH
OpenProject openproject.org
1..2..3
eurucamp eurucamp.org Call for Papers open until 1st May
1..2..3
jeden one: background
Single page v traditional HTML
SPA depends on your content
no kupa, Sherlock
What’s your content? Information Pages Membership sites Closed Systems
Content Criteria • Authentication • Caching • Indexing (SEO) •
curated Content vs Dynamic
dwa two: where we are now
History of the Rails Interface
“Rails is so 2005”
“Rails Way” back in 2005 • Server Generated HTML (ERB,
etc.) • Prototype • Scriptaculous • RJS
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.) • jQuery • jQuery UI • Server generated JavaScript Responses (SJR)
Where we are now
JavaScript is HUGE
No backend nobackend.org
Hoodie hood.ie
Meteor www.meteor.com
but I <3 Ruby
So here’s the question
None
Room for Rails?
The Rails Way
– Marcin Stecki @madsheep at wroc_love.rb “Not his [DHH]'s responsibility
to tell us how to do these things.”
Frontend frameworks
Frontend (MV*) frameworks • AngularJS • Ember.js • KnockoutJS
Frontend (component) frameworks • ReactJS • Backbone.View (alone) • ExtJS
TodoMVC todomvc.com
KnockoutJS
AngularJS
Ember.js
What is most like Rails?
Ember.js is most like Rails • Everything should inherit from
Ember.Object (think ActiveRecord::Base.inherited) • Routing DSL • Vocabulary (templates, partials, etc.)
trzy three: practical usage
Using asset pipeline / sprockets
Use Bower
gem install bower-rails
Rails 4 (Sprockets 2+)
config.assets.paths << File.join(Rails.root, 'vendor', 'assets', ‘components')
ember-rails-api github.com/dockyard/ember-appkit-rails
None
What is the way forward?
Split Completely
Two applications: one API, one frontend
Rails or Sinatra for API A JS workflow for Frontend
Surprisingly testable (and fast)
Dzięki!
Questions?
@myabc