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 (RubyConf Portugal)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Alex Coles
October 13, 2014
Technology
480
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Frontend Choices (RubyConf Portugal)
Alex Coles
October 13, 2014
More Decks by Alex Coles
See All by Alex Coles
How a language reflects its people (Brighton Ruby)
myabc
0
120
How a language reflects its people
myabc
0
100
Taking Rails beyond the asset pipeline (Workshop at RubyDay Italia)
myabc
0
87
Rails: beyond the asset pipeline (RubyC)
myabc
0
150
Frontend Choices (Tropical Ruby)
myabc
1
800
Frontend Choices
myabc
0
69
Frontend Choices
myabc
0
310
Putting the Hype back in Hypermedia
myabc
1
240
DataMapper
myabc
2
240
Other Decks in Technology
See All in Technology
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
2
580
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
230
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
230
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
23
7.2k
AWS Security Hub CSPMの成功・失敗体験
cmusudakeisuke
0
510
SONiCで構築・運用する生成AI向けパブリッククラウドネットワーク ~実装編~
sonic
0
330
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
20
7.2k
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
160
Claude Codeをどのように キャッチアップしているか
oikon48
13
8.8k
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
4
750
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
180
AIのReact習熟度を測る
uhyo
2
670
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
The SEO Collaboration Effect
kristinabergwall1
1
490
The Language of Interfaces
destraynor
162
27k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Claude Code のすすめ
schroneko
67
230k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Transcript
Alex Coles | RubyConf Portugal, Braga Frontend Choices
olá Braga
not really about choice
I’m a backend guy living in a frontend world “
quem sou eu?
@myabc Alex Coles Berlin, Germany Finn GmbH
@myabc openproject.org openproject.org OpenProject
@myabc eurucamp.org eurucamp.org eurucamp
@myabc eurucamp.org eurucamp.org eurucamp
10 years ago
10 years ago 2004
10 years ago what was I doing?
10 years ago what was I doing?
10 years ago what was I doing?
10 years ago what was the world doing?
10 years ago what was the world doing?
10 years ago what was the world doing?
10 years ago what was the world doing?
10 years ago what was the world doing?
10 years ago what was Portugal doing?
10 years ago what was Portugal doing?
10 years ago what was Portugal doing?
10 years ago what were you doing?
10 years ago what were you doing? ?
10 years ago what was Apple doing?
10 years ago what was Apple doing?
10 years ago what was Apple doing?
10 years ago what was the web doing?
10 years ago what was the web doing?
10 years ago there was no jQuery!
10 years ago but the end of 2004 was to
mark a transition
None
None
The Rails Way
Rails is so 2005 “
Rails is so 2005 “
“Rails Way” back in 2005
“Rails Way” back in 2005 •Server Generated HTML (ERB, etc.)
“Rails Way” back in 2005 •Server Generated HTML (ERB, etc.)
•Prototype
“Rails Way” back in 2005 •Server Generated HTML (ERB, etc.)
•Prototype •Scriptaculous
“Rails Way” back in 2005 •Server Generated HTML (ERB, etc.)
•Prototype •Scriptaculous •RJS
http://slash7.com/assets/2006/10/8/RJS-Demistified_Amy-Hoy-slash7_1.pdf RJS
http://slash7.com/assets/2006/10/8/RJS-Demistified_Amy-Hoy-slash7_1.pdf RJS
RJS
RJS <div id="items"></div> <%= link_to_remote 'Add to cart', url:
{ controller: 'cart', action: 'add_to_cart' }%> erb view
RJS <div id="items"></div> <%= link_to_remote 'Add to cart', url:
{ controller: 'cart', action: 'add_to_cart' }%> erb view class CartController < ActionController::Base def add_to_cart @item = CartItem.new @cart.items << @item end end controller
RJS <div id="items"></div> <%= link_to_remote 'Add to cart', url:
{ controller: 'cart', action: 'add_to_cart' }%> erb view class CartController < ActionController::Base def add_to_cart @item = CartItem.new @cart.items << @item end end controller page.insert_html :bottom, :items, partial: 'item', object: @item page.replace_html :items_count, I18n.t(:item, count: @cart.items.count) rjs view
…we mostly had “websites”
yahoo.com Yahoo! 2004
bindows.net Bindows 2004
gmail.com Gmail pre-β 2002-4 http://techcrunch.com/2008/06/06/the-evolution-of-pre-launch-gmail-in-screenshots/
where we are now
…we have “applications”
soundcloud.com Soundcloud
Single Page Application Architecture
Single Page Application Architecture - +
chunking Single Page Application Architecture - +
chunking controller Single Page Application Architecture - +
chunking controller templating Single Page Application Architecture - +
chunking controller templating routing Single Page Application Architecture - +
chunking controller templating routing real-time communicaton Single Page Application Architecture
- +
chunking controller templating routing real-time communicaton local storage Single Page
Application Architecture - +
“Rails Way” now
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.)
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.) • jQuery
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.) • jQuery • jQuery UI
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.) • jQuery • jQuery UI • Server generated JavaScript Responses (SJR)
JavaScript has grown up
JavaScript has grown up percentage of total JS developer jobs
has doubled from 2005 to 2010 indeed.com
JavaScript has grown up Server-side usage of JS has been
multiplied by 6 from Jan 2012 to Oct 2014 W3Techs.com
no backend nobackend.org
hood.ie Hoodie
isomorphism
meteor.com Meteor
frontend frameworks
frontend (MV*) frameworks
frontend (MV*) frameworks AngularJS
frontend (MV*) frameworks AngularJS KnockoutJS
frontend (MV*) frameworks AngularJS Ember.js KnockoutJS
frontend (component) frameworks
frontend (component) frameworks Ractive.js
ReactJS frontend (component) frameworks Ractive.js
ReactJS Backbone View (alone) frontend (component) frameworks Ractive.js
ReactJS ExtJS Backbone View (alone) frontend (component) frameworks Ractive.js
TodoMVC todomvc.com
More on MV*…
None
None
None
but I <3 Ruby !
so here is the question
“
is there room for Rails?
“ – Marcin Stecki @madsheepPL at wroc_love.rb Not his [DHH’s]
responsibility to tell us how to do these things.
single page vs. traditional HTML
naturally content-dependent
what is your content? general personal
what is your content? Information pages general personal
what is your content? Information pages Membership sites general personal
what is your content? Information pages Closed systems Membership sites
general personal
content criteria
content criteria • authentication
content criteria • authentication • how real is real-time
content criteria • authentication • how real is real-time •
caching
content criteria • authentication • how real is real-time •
caching • indexing (SEO)
how unique is the view to be rendered?
how unique is the view to be rendered? how many
combinations of a unique set of data?
how unique is the view to be rendered? how many
combinations of a unique set of data? • a blog with comments
how unique is the view to be rendered? how many
combinations of a unique set of data? • a blog with comments • a hotel page with reviews
how unique is the view to be rendered? how many
combinations of a unique set of data? • a blog with comments • a hotel page with reviews • a dashboard
if it is curated content Rails way →
other ways are better if it is SPA →
some tips
what is most like Rails? tip 1: familiarity
what is most like Rails? tip 1: familiarity
tip 1: familiarity Ember.js is most like Rails
Ember.js is most like Rails
Ember.js is most like Rails • everything should inherit from
main object
Ember.js is most like Rails • everything should inherit from
main object ActiveRecord::Base.inherited)
Ember.js is most like Rails • everything should inherit from
main object ActiveRecord::Base.inherited) Ember.Object
Ember.js is most like Rails • everything should inherit from
main object ActiveRecord::Base.inherited) Ember.Object Plain Old JavaScript Objects
Ember.js is most like Rails
Ember.js is most like Rails • routing DSL
Ember.js is most like Rails • routing DSL built-in routing
Ember.js is most like Rails • routing DSL built-in routing
built-in routing
Ember.js is most like Rails • routing DSL built-in routing
not in core, third party solutions built-in routing
Ember.js is most like Rails
Ember.js is most like Rails • vocabulary (templates, partials, etc.)
Ember.js is most like Rails • vocabulary (templates, partials, etc.)
Models, Controllers, Views, Initializers
Ember.js is most like Rails • vocabulary (templates, partials, etc.)
Models, Controllers, Views, Initializers Models, Controllers, Views, Initializers
Ember.js is most like Rails • vocabulary (templates, partials, etc.)
Dependency Injection, Factories, Services, Providers, Transclusion Models, Controllers, Views, Initializers Models, Controllers, Views, Initializers
how to make things work with Rails?
using asset pipeline / sprockets tip 2: Rails “the non-Rails
way
use Bower
use Bower
3 options for using Bower
gem install bower-rails 1 option gem
config.assets.paths << File.join(Rails.root, 'vendor', 'assets', ‘components') Rails 4 (Sprockets 2+)
2 option
rails-assets.org rails-assets.org 3 option
ember-rails-api github.com/dockyard/ember-appkit-rails
the app/assets/javascripts silo
one more thing… (sidetrack)
voltframework.com Volt Framework Volt is a framework for building data
rich web applications shockingly fast. Play Video ! Get Started " Home Getting Started Docs API Blog Community #
what is the way forward? →
(IMHO)
split completely ! tip 3: split
I don’t like monoliths
applications 2
applications 2 =
applications 2 = 1 API +
applications 2 frontend = 1 API + 1
API
API Rails
API Rails Sinatra
API Rails Sinatra Lotus.rb
frontend API Rails Sinatra Lotus.rb
frontend API Rails Sinatra JS workflows Lotus.rb
JavaScript tooling
isomorphism is possible http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/
surprisingly well testable (and fast)
muito obrigado!
perguntas?
@myabc