Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Frontend Choices
Search
Alex Coles
March 16, 2014
Technology
0
280
Frontend Choices
Alex Coles
March 16, 2014
Tweet
Share
More Decks by Alex Coles
See All by Alex Coles
How a language reflects its people (Brighton Ruby)
myabc
0
100
How a language reflects its people
myabc
0
81
Taking Rails beyond the asset pipeline (Workshop at RubyDay Italia)
myabc
0
60
Rails: beyond the asset pipeline (RubyC)
myabc
0
130
Frontend Choices (Tropical Ruby)
myabc
1
770
Frontend Choices (RubyConf Portugal)
myabc
1
450
Frontend Choices
myabc
0
57
Putting the Hype back in Hypermedia
myabc
1
230
DataMapper
myabc
2
220
Other Decks in Technology
See All in Technology
著者と読み解くAIエージェント現場導入の勘所 Lancers TechBook#2
smiyawaki0820
7
2.8k
Security Diaries of an Open Source IAM
ahus1
0
110
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
0
120
なぜ使われないのか?──定量×定性で見極める本当のボトルネック
kakehashi
PRO
1
760
How native lazy objects will change Doctrine and Symfony forever
beberlei
1
380
eBPFとwaruiBPF
sat
PRO
2
940
MCP・A2A概要 〜Google Cloudで構築するなら〜
shukob
0
160
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
21k
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
2
730
32のキーワードで学ぶ はじめての耐量子暗号(PQC) / Getting Started with Post-Quantum Cryptography in 32 keywords
quiver
0
200
セキュリティAIエージェントの現在と未来 / PSS #2 Takumi Session
flatt_security
3
1.4k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Fireside Chat
paigeccino
41
3.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
For a Future-Friendly Web
brad_frost
180
10k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Navigating Team Friction
lara
191
16k
How STYLIGHT went responsive
nonsquared
100
5.9k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Balancing Empowerment & Direction
lara
5
780
Being A Developer After 40
akosma
91
590k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Designing Experiences People Love
moore
142
24k
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