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
270
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
500
Build apps for Cars
keithyokoma
0
420
Save the state
keithyokoma
0
480
Either in Kotlin
keithyokoma
0
480
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
4.9k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
4.7k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
470
DX Improvements
keithyokoma
3
370
Other Decks in Programming
See All in Programming
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
130
Jakarta EE meets AI
ivargrimstad
1
250
How to Break into Reading Open Source
kaspth
0
120
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
110
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
210
ブラウザ互換の重要性 - あらゆるユーザーに価値を届けるために必要なこと
yamanoku
0
110
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
620
私のEbitengineの第一歩
qt_luigi
0
440
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
370
Some more adventure of Happy Eyeballs
coe401_
2
170
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
120
Featured
See All Featured
A better future with KSS
kneath
235
17k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
Fireside Chat
paigeccino
31
2.9k
How to Think Like a Performance Engineer
csswizardry
16
940
Docker and Python
trallard
39
3k
Documentation Writing (for coders)
carmenintech
65
4.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Intergalactic Javascript Robots from Outer Space
tanoku
268
26k
Visualization
eitanlees
142
15k
Debugging Ruby Performance
tmm1
72
12k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
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 ָ͍͢͝ ɾόοΫΤϯυͷΠϯλϑΣʔεͪΌΜ ͱ࡞Βͳ͍ͱ͋ͱͰٽ͘