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
クラシルを支える技術と組織
rakutek
0
190
猫と暮らすネットワークカメラ生活🐈 ~Vision frameworkでペットを愛でよう~ / iOSDC Japan 2025
yutailang0119
0
220
大規模アプリにおけるXcode Previews実用化までの道のり
ikesyo
0
1k
Let's Write a Train Tracking Algorithm
twocentstudios
0
220
気づいて!アプリからのSOS 〜App Store Connect APIで始めるパフォーマンス健康診断〜
waka12
0
260
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
340
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
Build your own WebP codec in Swift
kishikawakatsumi
2
890
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osk2025-duckdb
takahashiikki
1
230
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
120
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
160
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
490
Featured
See All Featured
Balancing Empowerment & Direction
lara
4
670
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Designing for Performance
lara
610
69k
GitHub's CSS Performance
jonrohan
1032
460k
Visualization
eitanlees
148
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
How to Ace a Technical Interview
jacobian
280
23k
KATA
mclloyd
32
14k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Why Our Code Smells
bkeepers
PRO
339
57k
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