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
20130126_Titanium新年会LT
Search
Keigo AOKI
January 26, 2013
Programming
0
570
20130126_Titanium新年会LT
Titanium新年会で披露したLTのスライドです。内容はAlloyの濃い目の小ネタの紹介。
※発表したスライドには会員限定コンテンツの個人情報が含まれていたので、一部をモザイク処理しています。
Keigo AOKI
January 26, 2013
Tweet
Share
More Decks by Keigo AOKI
See All by Keigo AOKI
Potential EM 制度を始めた理由、そして2年後にやめた理由 - EMConf JP 2025
hoyo
2
4.7k
【MediaLive利用事例】ライブ授業配信システムのリニューアル / Renewal of the live lesson streaming system
hoyo
0
320
ライブストリーミングサービスの負荷を捌くためにしたNのこと
hoyo
1
390
20140822_DITS4LT
hoyo
1
520
20140125_Titanium新年会LT
hoyo
0
430
Other Decks in Programming
See All in Programming
Catch Up: Go Style Guide Update
andpad
0
180
CSC305 Lecture 04
javiergs
PRO
0
250
ソフトウェア設計の実践的な考え方
masuda220
PRO
3
490
CSC509 Lecture 06
javiergs
PRO
0
240
XP, Testing and ninja testing ZOZ5
m_seki
3
320
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
920
メモリ不足との戦い〜大量データを扱うアプリでの実践例〜
kwzr
1
890
株式会社 Sun terras カンパニーデック
sunterras
0
230
Pythonスレッドとは結局何なのか? CPython実装から見るNoGIL時代の変化
curekoshimizu
4
1.4k
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
Чего вы не знали о строках в Python – Василий Рябов, PythoNN
sobolevn
0
160
Serena MCPのすすめ
wadakatu
4
900
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
185
22k
Code Reviewing Like a Champion
maltzj
525
40k
Bash Introduction
62gerente
615
210k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Language of Interfaces
destraynor
162
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Docker and Python
trallard
46
3.6k
For a Future-Friendly Web
brad_frost
180
9.9k
Music & Morning Musume
bryan
46
6.8k
How to Think Like a Performance Engineer
csswizardry
27
2k
Context Engineering - Making Every Token Count
addyosmani
5
190
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
None
None
• • • • •
None
None
None
None
None
<Alloy> <Collection src="book" /> <Window class="container"> <TableView dataCollection="book" dataTransform="transformFunction"> <TableViewRow
title="{title}" /> </TableView> </Window> </Alloy> $.index.open(); function transformFunction(model) { var transform = model.toJSON(); transform.title = '[' + transform.title + '] by ' + transform.author; return transform; } Alloy.Collections.book.fetch(); sample.xml • • sample.js
<Alloy> <Model src="session" /> <Window class="container"> <View> <Label id="userName" text="{session.userName}"
/> </View> </Window> </Alloy> $.index.open(); Alloy.Models.session.fetch(); sample.xml • • sample.js
None
None
None
None
None
// 略 var __alloyId70 = function() { $.__alloyId66.text = _.isFunction(Alloy.Models.session.transform)
? Alloy.Models.session.transform().userName : Alloy.Models.session.get("userName"); }; Alloy.Models.session.on("fetch change destroy", __alloyId70); // 略 sample.js • • •
extendModel: function(Model) { _.extend(Model.prototype, { transform: function() { var model
= this.toJSON(); if (_.isEmpty(model.userName)) { model.userName = 'Guest'; } return model; } }); // end extend return Model; }, session.js • • • •
• • •
• • •
None