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
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
430
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
670
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.3k
Domain-Driven Transformation
hschwentner
2
1.5k
What We Can Learn From OSS
inouehi
0
440
使ってみよう Azure AI Document Intelligence
kosmosebi
2
360
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1k
Site Reliability Engineering for GMO
pyama86
8
1.1k
AmperとFleetを使ったAndroidアプリ
yoppie
0
260
Documentation for users with AsciiDoc and Antora
ahus1
0
370
Snowflakeで眠ったデータを起こそう!
estie
0
140
Fast JSX: Don't clone props object #28768
yossydev
1
190
Featured
See All Featured
A designer walks into a library…
pauljervisheath
201
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Documentation Writing (for coders)
carmenintech
60
4k
We Have a Design System, Now What?
morganepeng
43
6.8k
What the flash - Photography Introduction
edds
64
11k
In The Pink: A Labor of Love
frogandcode
138
21k
GraphQLとの向き合い方2022年版
quramy
33
12k
Facilitating Awesome Meetings
lara
43
5.6k
Adopting Sorbet at Scale
ufuk
69
8.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
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