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
290
ライブストリーミングサービスの負荷を捌くためにしたNのこと
hoyo
1
370
20140822_DITS4LT
hoyo
1
500
20140125_Titanium新年会LT
hoyo
0
400
Other Decks in Programming
See All in Programming
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Quine, Polyglot, 良いコード
qnighy
4
620
役立つログに取り組もう
irof
28
9.3k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
220
EventSourcingの理想と現実
wenas
6
2.2k
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
0
130
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
780
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
200
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
4
2k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
610
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
2
75
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Gamification - CAS2011
davidbonilla
80
5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Bash Introduction
62gerente
608
210k
A Modern Web Designer's Workflow
chriscoyier
693
190k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
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