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
Emberjs
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Artur Kremens
October 20, 2014
Programming
0
77
Emberjs
Building an Ember App with Ruby on Rails Part 1
Artur Kremens
October 20, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
CSC307 Lecture 04
javiergs
PRO
0
660
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
Package Management Learnings from Homebrew
mikemcquaid
0
220
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Data-Centric Kaggle
isax1015
2
770
Grafana:建立系統全知視角的捷徑
blueswen
0
330
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Oxlint JS plugins
kazupon
1
880
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Facilitating Awesome Meetings
lara
57
6.8k
Code Reviewing Like a Champion
maltzj
527
40k
Code Review Best Practice
trishagee
74
20k
So, you think you're a good person
axbom
PRO
2
1.9k
Technical Leadership for Architectural Decision Making
baasie
1
240
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
We Have a Design System, Now What?
morganepeng
54
8k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Transcript
Emberjs part one http://emberjs.com
What do we need? • gem 'ember-rails' • gem 'bower-rails'
• gem 'emblem-rails' • http://www.ember-cli.com/
Bower - js package manager • Using with RoR ◦
Bowerfile ◦ initializer ◦ install assets rake bower:install (!) • Package manager ◦ http://bower.io
Getting started • Application structure • Application root element EmberApp
= Ember.Application.create({ rootElement: '#ember-application-holder' })
Router • Application route • Index route • Routes extend
EmberApp.Router.map -> @resource 'page', path: '/', -> @resource 'users', path: '/users', -> @route 'show', path: ':id'
Naming conventions • Router: ◦ AppName.PageRoute ◦ page_route.js.coffee • Controller:
◦ AppName.PageController ◦ page_controller.js.coffee • View: ◦ AppName.PageView ◦ page_view.js.coffee • Template: page.emblem
Outlets • Application template {{outlet}} • {{outlet name}} Render template
• @render 'users', {into: 'application'} • @render 'users', {into: 'application', outlet: 'modal'} • @render 'users', {into: 'page', outlet: 'page', controller: controller}
Model • Router set model model: (params) -> AppName.ModelName.find(params.id) •
Class methods AppName.ModelName.reopenClass find: (id = null) -> ...
View • actions and events • classNames ◦ classNameBinding •
tagName • template ◦ templateName ◦ template : Ember.Handlebars.compile('content')
• Router set controller setupController: (controller, model) -> controller.set('varName', 'value')
• Ember.ObjectController • Ember.ArrayController Controller
• binding • collection ◦ each controller.model div {{name}} ◦
each controller.model {{component-name nameInComponent=name}} ◦ {{view Ember.CollectionView contentBinding='data' itemViewClass='viewName'}} Templates
Components • Template component ◦ /templates/components/component-name.emblem • Ember Component ◦
/components/component-name.js.coffee
Computed properties • Depends on id and name isFirst: (->
@get('id') == 1 && (@get('id') == 'Artur') ).property('id', 'name') • Ember.computed.not('isFirst')
Thanks for attention Artur Kremens
[email protected]
+48507224476