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
【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
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
300
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
SpringBoot3.4の構造化ログ #kanjava
irof
2
970
SwiftUI Viewの責務分離
elmetal
PRO
0
140
Rails アプリ地図考 Flush Cut
makicamel
1
110
Open source software: how to live long and go far
gaelvaroquaux
0
620
Bedrock Agentsレスポンス解析によるAgentのOps
licux
2
720
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
AHC041解説
terryu16
0
590
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Done Done
chrislema
182
16k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Visualization
eitanlees
146
15k
Into the Great Unknown - MozCon
thekraken
35
1.6k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
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