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
540
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
280
ライブストリーミングサービスの負荷を捌くためにしたNのこと
hoyo
1
360
20140822_DITS4LT
hoyo
1
490
20140125_Titanium新年会LT
hoyo
0
390
Other Decks in Programming
See All in Programming
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
12
4.2k
Deep Dive into React Stream/Serialize
mugi_uno
3
760
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.4k
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
110
Open standards for building event-driven applications in the cloud
meteatamel
0
190
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
690
Goのエラースタックトレースの歴史と今後
sonatard
10
2k
CDKコントリビュートの最初の壁を越えよう! -簡単issueの見つけ方-
badmintoncryer
3
360
Tailwind CSSを本気でカスタマイズする方法
fsubal
15
5.6k
2024 コーディング研修
ckazu
0
440
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
1k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
33
12k
A designer walks into a library…
pauljervisheath
201
23k
Faster Mobile Websites
deanohume
300
30k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Design by the Numbers
sachag
274
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Statistics for Hackers
jakevdp
790
220k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
What's new in Ruby 2.0
geeforr
337
31k
Rails Girls Zürich Keynote
gr2m
91
13k
Navigating Team Friction
lara
179
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
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