Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Frontend Choices
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Alex Coles
September 18, 2014
Technology
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Frontend Choices
Alex Coles
September 18, 2014
More Decks by Alex Coles
See All by Alex Coles
How a language reflects its people (Brighton Ruby)
myabc
0
130
How a language reflects its people
myabc
0
110
Taking Rails beyond the asset pipeline (Workshop at RubyDay Italia)
myabc
0
97
Rails: beyond the asset pipeline (RubyC)
myabc
0
160
Frontend Choices (Tropical Ruby)
myabc
1
820
Frontend Choices (RubyConf Portugal)
myabc
1
490
Frontend Choices
myabc
0
320
Putting the Hype back in Hypermedia
myabc
1
250
DataMapper
myabc
2
250
Other Decks in Technology
See All in Technology
Metadata - Section 1: HTML Basics
mohab1
0
120
re:Invent初参加で変わったこと、2回目にやってみたいこと(JAWS-UG彩の国埼玉 #12)
mhrtech
2
220
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
150
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
Optunaの最新リリースv5.0について
pfn
PRO
0
120
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.4k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Making Projects Easy
brettharned
120
6.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
WCS-LA-2024
lcolladotor
0
890
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Test your architecture with Archunit
thirion
2
2.4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Transcript
Frontend choices Alex Coles | Ruby & Rails Meetup, Дніпропетро́вськ
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.org
eurucamp.org
1..2..3
one one: background
Single Page Application Architecture
Single Page Application Architecture • Chunking • Controller • Templating
• Routing • Real-time Communicaton • Local storage min MAX
single page vs. traditional HTML
naturally content-dependent
What’s your content? Information Pages Membership sites Closed Systems
Content Criteria • Authentication • Caching • Indexing (SEO) •
Content TTL - relevance at a point in time
Curated content vs. dynamic • how many combinations of a
unique set of data: • a blog with comments • a hotel page with reviews • a dashboard
two two: where we are now
“The Rails Way”
History of the Rails Interface
“Rails is so 2005”
“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
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
“Rails Way” now • Server Generated HTML (ERB, Slim, HAML
etc.) • jQuery • jQuery UI • Server generated JavaScript Responses (SJR)
Where we are now
JavaScript has grown up
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
None
None
None
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.)
three three: practical usage
Using asset pipeline / sprockets
Use Bower
3 options for using Bower
gem install bower-rails Option 1
Rails 4 (Sprockets 2+) Option 2
config.assets.paths << File.join(Rails.root, 'vendor', 'assets', ‘components') Option 2
Option 3 rails-assets.org
ember-rails-api github.com/dockyard/ember-appkit-rails
the app/assets/javascripts silo
None
What is the way forward?
(IMHO)
Split Completely
I don’t like monoliths
Two applications: one API, one frontend
Rails or Sinatra for API A JS workflow for Frontend
Surprisingly testable (and fast)
One more thing…
Volt is a framework for building data rich web applications
shockingly fast. Play Video ! Get Started " Home Getting Started Docs API Blog Community # Volt Framework voltframework.com
Спасибо Спасибі
Questions?
@myabc