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
550
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
1.3k
【MediaLive利用事例】ライブ授業配信システムのリニューアル / Renewal of the live lesson streaming system
hoyo
0
300
ライブストリーミングサービスの負荷を捌くためにしたNのこと
hoyo
1
370
20140822_DITS4LT
hoyo
1
500
20140125_Titanium新年会LT
hoyo
0
400
Other Decks in Programming
See All in Programming
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
820
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
890
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
220
『品質』という言葉が嫌いな理由
korimu
0
180
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
6
2.1k
GAEログのコスト削減
mot_techtalk
0
120
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
220
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
110
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
8
2.7k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
560
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
4
890
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Done Done
chrislema
182
16k
The Pragmatic Product Professional
lauravandoore
32
6.4k
How GitHub (no longer) Works
holman
314
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
GraphQLとの向き合い方2022年版
quramy
44
13k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
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