Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Frontend Choices
Search
Alex Coles
March 16, 2014
Technology
0
240
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
90
How a language reflects its people
myabc
0
74
Taking Rails beyond the asset pipeline (Workshop at RubyDay Italia)
myabc
0
44
Rails: beyond the asset pipeline (RubyC)
myabc
0
110
Frontend Choices (Tropical Ruby)
myabc
1
720
Frontend Choices (RubyConf Portugal)
myabc
1
410
Frontend Choices
myabc
0
49
Putting the Hype back in Hypermedia
myabc
1
220
DataMapper
myabc
2
210
Other Decks in Technology
See All in Technology
re:Invent 2024のふりかえり
beli68
0
110
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
JAWS-UG20250116_iOSアプリエンジニアがAWSreInventに行ってきた(真面目編)
totokit4
0
140
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
5
1.3k
いま現場PMのあなたが、 経営と向き合うPMになるために 必要なこと、腹をくくること
hiro93n
9
7.7k
2024年活動報告会(人材育成推進WG・ビジネスサブWG) / 20250114-OIDF-J-EduWG-BizSWG
oidfj
0
230
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
860
Formal Development of Operating Systems in Rust
riru
1
420
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
140
あなたの知らないクラフトビールの世界
miura55
0
130
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Statistics for Hackers
jakevdp
797
220k
Making Projects Easy
brettharned
116
6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
4 Signs Your Business is Dying
shpigford
182
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
How to train your dragon (web standard)
notwaldorf
89
5.8k
GitHub's CSS Performance
jonrohan
1030
460k
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