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
View Asset Pipeline Integration
Search
nicolai86
October 30, 2011
Programming
2
200
View Asset Pipeline Integration
A short example on how to move you're views into the asset pipeline using HAML & Handlebars
nicolai86
October 30, 2011
Tweet
Share
More Decks by nicolai86
See All by nicolai86
Migrating Monolith Rails 2.x Applications using SSO
nicolai86
1
190
Other Decks in Programming
See All in Programming
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
190
ログラスを支える設計標準について / loglass-design-standards
urmot
10
2.1k
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
1인 개발자로 행복하게 살기 - GDG 송도 헬로월드 2024
benjaminkim
1
5.6k
"config" ってなんだ? / What is "config"?
okashoi
0
210
今の SmartHR にエンジニアで入社するとどうなるの?
daisukeshinoku
5
4.6k
コードレビューで学ぶ!Kotlinオブジェクト指向デザインパターン
akkie76
2
180
SpringBoot+MyBatisで例外が出たときどこを見るか
syukai
0
110
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.8k
Git Rebase
bkuhlmann
11
1.6k
甘い香りに誘われてVanilla Extractを1年間運用してみた
miyahkun
1
110
CircleCIを活用して AWSへの継続的デリバリーを 実践する
coconala_engineer
1
230
Featured
See All Featured
Side Projects
sachag
451
41k
The Mythical Team-Month
searls
215
42k
Writing Fast Ruby
sferik
620
60k
Rebuilding a faster, lazier Slack
samanthasiow
72
8.2k
What's in a price? How to price your products and services
michaelherold
237
11k
Producing Creativity
orderedlist
PRO
336
39k
Web development in the modern age
philhawksworth
202
10k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
YesSQL, Process and Tooling at Scale
rocio
163
13k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
A Tale of Four Properties
chriscoyier
150
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Transcript
Asset Pipeline Integration Raphael Randschau w e l u s
e G m b H Sunday, October 30, 11
current state Sunday, October 30, 11
our GOAL first visit Sunday, October 30, 11
our GOAL subsequent visits Sunday, October 30, 11
our GOAL view assembled on the client-side thin controllers fast
page load times! less load! single-page application interesting things can be achieved: - 100% offline apps AppCache - Sunday, October 30, 11
welcome to the asset pipeline not build for view- construction
write HTML yourself no Helper localization won’t do Sunday, October 30, 11
some problems rendering & templating engine ActionView::Helpers attribute binding localization
authorization Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets template engine Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets = hbs_form_for :user do |f| =
f.text_field :name template engine Sunday, October 30, 11
partial solutions haml_assets haml_handlebars_assets = hbs_form_for :user do |f| =
f.text_field :name template engine Sunday, October 30, 11
partial solutions <form> <input type=”text” value=”{{name}}” /> </form> haml_assets haml_handlebars_assets
= hbs_form_for :user do |f| = f.text_field :name template engine Sunday, October 30, 11
partial solutions Routes handlebars_routes_assets Sunday, October 30, 11
partial solutions r.edit_user_path Routes handlebars_routes_assets Sunday, October 30, 11
partial solutions r.edit_user_path Routes handlebars_routes_assets /users/{{id}}/edit Sunday, October 30, 11
partial solutions = hbs_form_for :user, action: r.edit_user_path, method: :put do
|f| = f.text_field :name <form action=”/users/{{id}}/edit” method=”put”> <input type=”text” value=”{{name}}” /> </form> Sunday, October 30, 11
partial solutions t(:‘hello.world’) Localization jquery-localization-engine Sunday, October 30, 11
partial solutions t(:‘hello.world’) <span rel=”localize[hello.world]”> Hello World! </span> Localization jquery-localization-engine
Sunday, October 30, 11
partial solutions t(:‘hello.world’) <span rel=”localize[hello.world]”> Hello World! </span> $("[rel*=localize]").localize("locales/de") Localization
jquery-localization-engine Sunday, October 30, 11
partial solutions review HAML - rendering ActionView::Helpers handlebars templating dynamic
localization Sunday, October 30, 11
partial solutions questions integrate I18n into FormHelpers ? authorization in
the client? data-filter in the server? restore state when accessing URLs directly? Sunday, October 30, 11
samples https://github.com/leahpar/backbone-asset-pipeline-example http://nicolai86.eu Sunday, October 30, 11
Discussion Sunday, October 30, 11