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
300
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
530
Build apps for Cars
keithyokoma
0
450
Save the state
keithyokoma
0
500
Either in Kotlin
keithyokoma
0
510
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
4.9k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
4.8k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
490
DX Improvements
keithyokoma
3
380
Other Decks in Programming
See All in Programming
Ethereum_.pdf
nekomatu
0
460
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
320
Quine, Polyglot, 良いコード
qnighy
4
640
RubyLSPのマルチバイト文字対応
notfounds
0
120
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A Modern Web Designer's Workflow
chriscoyier
693
190k
What's in a price? How to price your products and services
michaelherold
243
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Being A Developer After 40
akosma
86
590k
Automating Front-end Workflow
addyosmani
1366
200k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
The Language of Interfaces
destraynor
154
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
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 ָ͍͢͝ ɾόοΫΤϯυͷΠϯλϑΣʔεͪΌΜ ͱ࡞Βͳ͍ͱ͋ͱͰٽ͘