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
ノハナのアプリを爆速で動くようにした話
Search
Keishin Yokomaku
May 15, 2014
Programming
6
2.9k
ノハナのアプリを爆速で動くようにした話
Keishin Yokomaku
May 15, 2014
Tweet
Share
More Decks by Keishin Yokomaku
See All by Keishin Yokomaku
One screen, many BottomSheets
keithyokoma
0
340
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
570
Build apps for Cars
keithyokoma
0
470
Save the state
keithyokoma
0
520
Either in Kotlin
keithyokoma
0
530
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
5k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
4.9k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
500
DX Improvements
keithyokoma
3
380
Other Decks in Programming
See All in Programming
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
270
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
5.8k
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
270
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
760
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
270
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
230
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
390
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
260
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
400
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
240
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
160
return文におけるstd::moveについて
onihusube
1
1.4k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
RailsConf 2023
tenderlove
29
960
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Automating Front-end Workflow
addyosmani
1366
200k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How GitHub (no longer) Works
holman
312
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Transcript
ϊϋφͷΞϓϦΛരͰ ಈ͘Α͏ʹͨ͠ @KeithYokoma
ࣗݾհ @KeithYokoma(ԣນ ܓਅ) 2011 גࣜձࣾϛΫγΟೖࣾ ϊϋφͷதͷਓ Android ΞϓϦͷਓ
Available on Kindle Store http://amzn.to/1mZNydv
ࠓͷ͓ Parse ͱ্खʹ͖ͭ͋͏ ઃܭΛ͍͍ײ͡ʹ͢Δ
ϊϋφͷόοΫΤϯυ Parse.com ParseSDK
ParseSDK ҎԼͷ͜ͱΛͯ͘͠ΕΔ ɾόοΫΤϯυͷϦΫΤετ ɾऔಘͨ͠σʔλͷཧ ɾϢʔβΞΧϯτͷηογϣϯཧ ɾetc…
ParseSDK ͷಛ 1. ඇಉظॲཧ͕؆୯ʹѻ͑Δ
ParseSDK Ͱඇಉظॲཧ ParseQuery<ParseObject> query = ParseQuery.getQuery(“SomeData”); query.findInBackground(new FindCallback<ParseObject>() { public
void done(List<ParseObject> result, ParseException e) { if (e == null) { // Normal } else { // Error } } });
ParseSDK ͷಛ 2. ৼΔ͍Λ֦ுͰ͖Δ
ParseSDK ͰৼΔ͍Λ֦ு public class SomeData extends ParseObject { @Override public
void saveInBackground(SaveCallback callback) { if (!isValidName()) { callback.done(new ParseException()); } super.saveInBackground(callback); } }
ParseSDK ͷಛ 3. ΩϟογϡجຊͷϩδοΫӅṭ͞ΕΔ SDK ͕Α͠ͳʹ໘Λݟͯ͘ΕΔ
؆୯ʂ
1BSTF0CKFDU 1IPUP#PPL 1IPUP 1BHF ʜ
ڞ௨ͷॲཧ͋ΔΑͶʂ
1BSTF0CKFDU 1IPUP#PPL 1IPUP 1BHF ʜ *NBHF.PEFM .PEFM /FXT ʜ
–ϨϏϡʔ “ڧ੍ऴྃ͢Δ”
–ϨϏϡʔ “͑ͳ͍ɻ ͙͢ڧ੍ऴྃʹͳͬͯຊʹ͑ͳ͍”
–Crashlytics “New Fatal Issue Discovered in ϊϋφ”
ParseSDK ͷ᠘ 1. ඇಉظॲཧ͕φΠʔϒ ɾϝΠϯεϨουͰ wait ͢Δॴ͕͋Δ ɾContext ͷੜࢮʹؔΘΒͣίʔϧόοΫΛ ݺͿ
ParseSDK ͷ᠘ 2. ϦΫΤετͷϦτϥΠ͕Լख >> java.lang.IllegalStateException: Manager is shut down.
<<
ParseSDK ͷ᠘ 3. ΦϑϥΠϯͷରԠ͕ࡶ ɾίωΫγϣϯ͕ແ͍ͱΑ͘མͪΔ
ParseSDK ͷ᠘ 4. υΩϡϝϯτʹͳ͍Τϥʔ͕ฦͬͯ͘Δ ɾෛՙ্͕͕ΔͱΑ͘ى͜Δ
ParseSDK ͷ᠘ 5. औ͖ͬͯͨσʔλΛऔΓग़͢ͷ࣌ؒ৯͏ ɾParseObject#get**(String) ɾreturn ʹࢸΔ·ͰͷνΣοΫ͕ωοΫ ɾParseObjectͷίϨΫγϣϯ͓͠Լ͍͞
ϊϋφͰ ParseSDK ParseObject ͷ֦ுΫϥε܈ ɾϞσϧͷࣄશ෦ͦͷதʹ ɾڊେϞσϧʹ ɾςετͳ͍ ɾϝϞϦϦʔΫͷڪාʹک͑Δຖ
–ඵ5Ϋϥογϡ “ͨͪͷલʹ ະͩڊେ͗͢ΔϞσϧ͕ ᣔയͱͨ͠ΫϥογϡϨϙʔτ͕ Ͳ͏͠Α͏ͳ͘ɺԣͨΘ͍ͬͯͨ”
Ver2.0.0 શମΛϦϑΝΫλϦϯά
ParseSDK ͱ্खʹ͖߹͏ ɾͱΓ͋͑ͣ SDK ͷඇಉظॲཧΊΔ ɾͱΓ͋͑ͣ ParseObject ͷ֦ுΛΊΔ ɾͪΌΜͱϨΠϠΛ͚ͯཧ͢Δ
Parse.com Client Converter Loader Model Request Response ParseObject Entity Model
Worker Thread Main Thread
ParseSDK ͱ্खʹ͖߹͏ UIεϨουͷੈքʹParseObjectΛೖΕͳ͍ ɾLoader ͰੈքΛ̎ͭʹஅ ɾόοΫΤϯυͱͷΛClientʹڽू ɾσʔλߏͱParseObjectΛ
݁Ռ ɾڊେϞσϧډͳ͘ͳͬͨ ɾStop the world ͠ͳ͘ͳͬͨ ɾSDK ͷ᠘ʹΑΔΫϥογϡ͕ݮͬͨ ɾςετ͕ॻ͖͘͢ͳͬͨ
ͳΜͱ͔͍ͨ͜͠ͱ ɾParseObject ͔ΒσʔλΛऔΓग़͢ͷॏ͍ ɾREST API ͋ΔͷͰͦΕΛ͍͍ͨ ɾόοΫΤϯυͷΓସ͑Λָʹ͍ͨ͠
݁ ɾBaaS ָ͍͢͝ ɾόοΫΤϯυͷΠϯλϑΣʔεͪΌΜ ͱ࡞Βͳ͍ͱ͋ͱͰٽ͘