SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Criticue of “library” approach
in developing for android
ILLYA RODIN
Lead Android Engineer
Agenda
● Origin
● Greedy ORM
● “Fast” communication with EventBus
● “Rapid” Mortar
● RxAndroid: real solution for unreal problems
● Everything else…
● Q&A
Out of topic
● Image download managers (UIL, Glide, Picasso, e.t.c.)
○ DownloadManager, Volley
● Integration libraries (Facebook SDK, Twitter Kit, Google Play Service, e.t.c )
● Analytic, advertising, debug, loggers, test, memory profiling, e.t.c.
● Custom UI components
”Android Performance Workshop” Romain Guy and Chet Haase
Devoxx 2013
“External libraries:
● Not necessarily written for Android
● Potentially large expensive for small benefits”
“Do not multiply own mistakes by the other
people's mistakes”
©Good sense
Origin
“Commandments”
● Be careful with resources
○ RAM (especially!)
○ Battery
○ CPU/GPU
○ Device memory
○ Network
©”The Art of War” Sun-tzu
● Be respectful to platform
○ Components life cycle
○ Cooperation with environment
○ Fragmentation
● Do everything faster ● “Good things - simple things”
Every Device is a Village
“... which means that everybody has to
cooperate to make the user experience
on that device work. You can all make it
suck together, or you could make it nice
together.
Chet Haase
Udi Cohen
PerformanceDemo
Greedy ORM
Why not?!
*Almost
Galligan's War
Kevin Galligan
Blog
Droidcon 2015 London
“Generally we (touchlab) use ORMlite to build an app
without too much concern for performance, then test and
improve as needed.”
“I’d say if you have serious problems managing raw SQL,
you shouldn’t be using SQLite at all.
…
So, my opinion is that you shouldn’t pick an ORM because
its the fastest, but because of its features. However, I
would encourage ORM authors to improve their
performance where reasonable.”
“This also kind of turned into a big talk about Realm, which
wasn’t the goal. Outside of the medical study framework, I
don’t think we’d be likely to use it in a production app, but we
have a lot more sqlite experience in house.”
https://github.com/touchlab/android-orm-
benchmark-updated
Let's check?!
Input:
● OS versions: 4.2.2 and 5.1
(Genymotion)
● Device: Nexus 4
● 10 subscribers x 10 events
● 5 experiments
● 2000 Users
● 20000 Messages
Kevin’s My
GreenDAO 2.0.0 2.1.0
ORMLite 4.48 4.48
DBFlow 2.0.0 3.0.0-beta5
Squeaky 0.4.0 0.4.0.2
Realm 0.84.1 0.88.0
OS Write (ms) Read(ms)
W/R
(slower)
Write (ms)
In memory
Read(ms)
In memory
W/R
(slower)
SQLite
4.2.2 2741 647 2202 532
5.1 1248 365 1153 378
SQLiteX
4.2.2 901 474 867 446
5.1 734 373 721 342
DBFlow
4.2.2 1297 740 1036 640
5.1 1001 514 1101 546
GreenDAO
4.2.2 1256 670 1159 775
5.1 1243 563 956 516
ORMLite
4.2.2 1792 914 1750 902
5.1 1673 621 1560 654
Squidb
4.2.2 1012 454 1015 479
5.1 948 386 780 404
OS Write (ms) Read(ms) W/R (slower)
Write (ms)
In memory
Read(ms)
In memory
W/R (slower)
Realm
4.2.2 1257 552 39%/17% 1347 670 55%/50%
5.1 1598 814 117%/118% 1552 803 115%/134%
Using the NDK Performantly (Big Android BBQ 2015)
What can really help?
The Definitive Guide to SQLite
Grokking Android
URI
Next?!
“Fast” communication with EventBus
http://greenrobot.org/eventbus/
What is EventBus? It…
● simplifies the communication between components
● decouples event senders and receivers
● performs well with Activities, Fragments, and background threads
● avoids complex and error-prone dependencies and life cycle issues
● makes your code simpler
● is fast
● is tiny (<50k jar)
● is proven in practice by apps with 100,000,000+ installs
● has advanced features like delivery threads, subscriber priorities, etc.
*Almost
Let's check?!
EventBus Vs LocalBroadcastManager (LBM)
Input:
● OS versions: 4.2.2 and 5.1 (Genymotion)
● Device: Nexus 4
● Event Bus 3.0
● LocalBroadcastManager 23.2.1
● Subscriber thread: UI thread
● Sender thread: Worker Thread (IntentService)
● 10 subscribers x 10 events
● 5 experiments*
OS
Avr. Time
(ms)
EventBus
4.2.2 1878.8
5.1 540.4
LBM
4.2.2 1508 ~24% faster
5.1 381.6 ~41% faster
Who next?
“Rapid” Mortar
A little history...
Spring of 2010...
Results...
+2 projects at Google play market
He was “surprised” ....
Next developer...
I think so...
Why this can't work good?!
● Inconvenient to support changes in API and backward compatibility
● Lose all benefits for to control on Task stack
● Unreasonable consuming memory
● Lose some cool features (e.g. Android Transition Framework)
● e.t.c.
One more?
RxAndroid: real solution for
unreal problems
Problems:
● CPU intensive tasks
● connection to network
● work with files
● long-running activity
● e.t.c
Tools:
● Java Threads + concurrency
framework
● HaMeR
● AsyncTask
● Loaders
● Services
● JobScheduler
● AlarmManager
● DownloadManager
● e.t.c.
Where the place for RxAndroid?
https://github.com/googlesamples/android-testing-templates.git
“I’m aware of retrolambda, and I think I love the idea. I think it’s
wonderful. Before using it, I would go decompile the result of
retrolambda to see what exactly happens. Because with lambda, I’
m sure you could have nasty surprises. I’m pretty sure it turns into
anonymous classes somewhere, so you might end up with tons of
allocations depending on how they’re invoked. For instance, if I
pass a lambda in a loop, what happens in terms of allocations? So, I
would just go look at the disassembly and see what’s going on
before I would decide. You know, the anonymous class could be
cached, or it could be reallocated every time, I don’t know. I would
have to look at it. It’s one of those cases where it’s important, as
software engineers, to try to understand what is going on under the
hood before making a decision about how to use it, because you
can end up with nasty surprises down the road. And of course, in
some cases like if you just using that lambda when you click on a
button, that really doesn’t matter, right? Performance is not that big
of an issue when you click on a button.
Romain Guy
Everything else…
DI
facebook engineering
TTD
Erik Meijer is Dutch computer scientist, the
founder of Applied Duality, one of the creators of
modern programming languages such as C#.
…
Unsurprisingly, Meijer has a take on how the
development work should be organized and
executed. He states that test-driven
development should die out – it can’t predict the
bugs anyway.
– Just push it to production. It will fail, but
testing is only about writing tests, not real code.
If it breaks, fix it! TDD is for pussies!
https://reaktor.com/blog/erik-
meijer-software-eating-world/
Android Application Testing Guide
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
compile "com.raizlabs.android:DBFlow:2.2.1"
compile 'com.google.dagger:dagger:2.0'
compile 'javax.annotation:jsr250-api:1.0'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
compile 'com.squareup.retrofit:converter-jackson:2.0.0-beta2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.birbit:android-priority-jobqueue:1.3.5'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.fasterxml.jackson:jackson-parent:2.6.2'
compile 'joda-time:joda-time:2.9.1'
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
apt 'com.google.dagger:dagger-compiler:2.0'
androidTestApt 'com.google.dagger:dagger-compiler:2.0'
androidTestCompile 'com.android.support.test:runner:0.4'
// Set this dependency to use JUnit 4 rules
androidTestCompile 'com.android.support.test:rules:0.4'
// Set this dependency to build and run Espresso tests
androidTestCompile 'com.android.support.test.espresso:
espresso-core:2.2.1'
// Set this dependency to build and run UI Automator tests
androidTestCompile 'com.android.support.test.uiautomator:
uiautomator-v18:2.1.2'
androidTestCompile 'com.android.support:support-annotations:
23.1.1'
androidTestCompile 'org.mockito:mockito-core:2.0.2-beta'
androidTestCompile ('com.android.support.test.espresso:
espresso-contrib:2.2.1') {
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
https://github.com/yigit/dev-summit-architecture-demo.git
“This is not an official Google product.
● The sample app uses many public open source
projects. You should not take these as
suggestions to use in your app. This demo
application is written in a short time and we've
used many libraries to make it a complete app as
fast as possible. Since this is a demo app, we did
not care much about performance characteristics
of these libraries. As always, do your due diligence
before using any library.
● The models do not cache anything in memory. A
real app should.
● There is moderate testing for the project. They are
not state of the art testing examples but show
how different use cases can be tested.”
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.android.support:support-annotations:
22.2.0'
compile 'com.android.support:gridlayout-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.google.android.apps.muzei:muzei-api:
2.0'
compile 'com.google.android.gms:play-services-gcm:
8.3.0'
compile 'com.google.android.gms:play-services-
location:8.3.0'
https://github.com/sorinpanduru/sunshine.git
https://github.com/googlesamples/android-
BasicSyncAdapter.git
https://github.com/googlesamples/android-testing-
templates.git
https://github.com/googlesamples/android-architecture
Meanwhile…
Somewhere…
“Programming is not a science. Programming is a craft.”
- Richard Stallman
Q&A
Thanks you for
attention!

Contenu connexe

Tendances

Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyMike Brittain
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
Mobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CDMobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CDGlobalLogic Ukraine
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniquesMike McGarr
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingKatie Chin
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the ContinuistPaul Blundell
 
So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?Steve Wells
 
DevOps 及 TDD 開發流程哲學
DevOps 及 TDD 開發流程哲學DevOps 及 TDD 開發流程哲學
DevOps 及 TDD 開發流程哲學謝 宗穎
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreSpark Summit
 
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Introduction to Continuous Delivery (BBWorld/DevCon 2013)Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Introduction to Continuous Delivery (BBWorld/DevCon 2013)Mike McGarr
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev toolsShaka Huang
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureYury Tsarev
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applicationsAndrii Soldatenko
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocolsVivek Parihar
 
Distributed Release Management
Distributed Release ManagementDistributed Release Management
Distributed Release ManagementMike Brittain
 
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...Donny Wals
 
Continuous integration using Jenkins and Sonar
Continuous integration using Jenkins and SonarContinuous integration using Jenkins and Sonar
Continuous integration using Jenkins and SonarPascal Larocque
 
Continuous delivery the french way Agile Cambridge 2014
Continuous delivery the french way Agile Cambridge 2014Continuous delivery the french way Agile Cambridge 2014
Continuous delivery the french way Agile Cambridge 2014Dimitri Baeli
 

Tendances (20)

Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Mobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CDMobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CD
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniques
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End Testing
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
 
So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?
 
DevOps 及 TDD 開發流程哲學
DevOps 及 TDD 開發流程哲學DevOps 及 TDD 開發流程哲學
DevOps 及 TDD 開發流程哲學
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyre
 
TestIstanbul 2015
TestIstanbul 2015TestIstanbul 2015
TestIstanbul 2015
 
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Introduction to Continuous Delivery (BBWorld/DevCon 2013)Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applications
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
 
Distributed Release Management
Distributed Release ManagementDistributed Release Management
Distributed Release Management
 
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
 
Continuous integration using Jenkins and Sonar
Continuous integration using Jenkins and SonarContinuous integration using Jenkins and Sonar
Continuous integration using Jenkins and Sonar
 
Continuous delivery the french way Agile Cambridge 2014
Continuous delivery the french way Agile Cambridge 2014Continuous delivery the french way Agile Cambridge 2014
Continuous delivery the french way Agile Cambridge 2014
 

Similaire à Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...DevClub_lv
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJSFestUA
 
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Kaxil Naik
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigueTobias Braner
 
Riereta Node.js session 3 (with notes)
Riereta Node.js session 3 (with notes)Riereta Node.js session 3 (with notes)
Riereta Node.js session 3 (with notes)Tekno Paul
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceIntel® Software
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUMichael Dawson
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local developmentAdam Štipák
 

Similaire à Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016. (20)

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Node azure
Node azureNode azure
Node azure
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
 
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 
Riereta Node.js session 3 (with notes)
Riereta Node.js session 3 (with notes)Riereta Node.js session 3 (with notes)
Riereta Node.js session 3 (with notes)
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript Performance
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU
 
Web Leaps Forward
Web Leaps ForwardWeb Leaps Forward
Web Leaps Forward
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Surge2012
Surge2012Surge2012
Surge2012
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local development
 

Plus de UA Mobile

Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...UA Mobile
 
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...UA Mobile
 
Leave your Room behind - UA Mobile 2019
Leave your Room behind - UA Mobile 2019Leave your Room behind - UA Mobile 2019
Leave your Room behind - UA Mobile 2019UA Mobile
 
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019UA Mobile
 
Google Wear OS watch faces and applications development - UA Mobile 2019
Google Wear OS watch faces and applications development - UA Mobile 2019Google Wear OS watch faces and applications development - UA Mobile 2019
Google Wear OS watch faces and applications development - UA Mobile 2019UA Mobile
 
Історія декількох проектів та що в них пішло не так - UA Mobile 2019
Історія декількох проектів та що в них пішло не так - UA Mobile 2019Історія декількох проектів та що в них пішло не так - UA Mobile 2019
Історія декількох проектів та що в них пішло не так - UA Mobile 2019UA Mobile
 
Working effectively with ViewModels and TDD - UA Mobile 2019
Working effectively with ViewModels and TDD - UA Mobile 2019Working effectively with ViewModels and TDD - UA Mobile 2019
Working effectively with ViewModels and TDD - UA Mobile 2019UA Mobile
 
Managing State in Reactive applications - UA Mobile 2019
Managing State in Reactive applications - UA Mobile 2019Managing State in Reactive applications - UA Mobile 2019
Managing State in Reactive applications - UA Mobile 2019UA Mobile
 
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019UA Mobile
 
Актуальні практики дизайну мобільних додатків - UA Mobile 2019
Актуальні практики дизайну мобільних додатків - UA Mobile 2019Актуальні практики дизайну мобільних додатків - UA Mobile 2019
Актуальні практики дизайну мобільних додатків - UA Mobile 2019UA Mobile
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019UA Mobile
 
Building your Flutter apps using Redux - UA Mobile 2019
Building your Flutter apps using Redux - UA Mobile 2019Building your Flutter apps using Redux - UA Mobile 2019
Building your Flutter apps using Redux - UA Mobile 2019UA Mobile
 
Optional. Tips and Tricks - UA Mobile 2019
Optional. Tips and Tricks - UA Mobile 2019Optional. Tips and Tricks - UA Mobile 2019
Optional. Tips and Tricks - UA Mobile 2019UA Mobile
 
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...UA Mobile
 
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019UA Mobile
 
Flutter: No more boring apps! - UA Mobile 2019
Flutter: No more boring apps! - UA Mobile 2019Flutter: No more boring apps! - UA Mobile 2019
Flutter: No more boring apps! - UA Mobile 2019UA Mobile
 
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019UA Mobile
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019UA Mobile
 
Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019UA Mobile
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.UA Mobile
 

Plus de UA Mobile (20)

Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
 
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
 
Leave your Room behind - UA Mobile 2019
Leave your Room behind - UA Mobile 2019Leave your Room behind - UA Mobile 2019
Leave your Room behind - UA Mobile 2019
 
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
 
Google Wear OS watch faces and applications development - UA Mobile 2019
Google Wear OS watch faces and applications development - UA Mobile 2019Google Wear OS watch faces and applications development - UA Mobile 2019
Google Wear OS watch faces and applications development - UA Mobile 2019
 
Історія декількох проектів та що в них пішло не так - UA Mobile 2019
Історія декількох проектів та що в них пішло не так - UA Mobile 2019Історія декількох проектів та що в них пішло не так - UA Mobile 2019
Історія декількох проектів та що в них пішло не так - UA Mobile 2019
 
Working effectively with ViewModels and TDD - UA Mobile 2019
Working effectively with ViewModels and TDD - UA Mobile 2019Working effectively with ViewModels and TDD - UA Mobile 2019
Working effectively with ViewModels and TDD - UA Mobile 2019
 
Managing State in Reactive applications - UA Mobile 2019
Managing State in Reactive applications - UA Mobile 2019Managing State in Reactive applications - UA Mobile 2019
Managing State in Reactive applications - UA Mobile 2019
 
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
 
Актуальні практики дизайну мобільних додатків - UA Mobile 2019
Актуальні практики дизайну мобільних додатків - UA Mobile 2019Актуальні практики дизайну мобільних додатків - UA Mobile 2019
Актуальні практики дизайну мобільних додатків - UA Mobile 2019
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019
 
Building your Flutter apps using Redux - UA Mobile 2019
Building your Flutter apps using Redux - UA Mobile 2019Building your Flutter apps using Redux - UA Mobile 2019
Building your Flutter apps using Redux - UA Mobile 2019
 
Optional. Tips and Tricks - UA Mobile 2019
Optional. Tips and Tricks - UA Mobile 2019Optional. Tips and Tricks - UA Mobile 2019
Optional. Tips and Tricks - UA Mobile 2019
 
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...Designing iOS+Android project without using multiplatform frameworks - UA Mob...
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
 
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
 
Flutter: No more boring apps! - UA Mobile 2019
Flutter: No more boring apps! - UA Mobile 2019Flutter: No more boring apps! - UA Mobile 2019
Flutter: No more boring apps! - UA Mobile 2019
 
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
 
Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.
 

Dernier

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Dernier (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.

  • 1. Criticue of “library” approach in developing for android ILLYA RODIN Lead Android Engineer
  • 2. Agenda ● Origin ● Greedy ORM ● “Fast” communication with EventBus ● “Rapid” Mortar ● RxAndroid: real solution for unreal problems ● Everything else… ● Q&A
  • 3. Out of topic ● Image download managers (UIL, Glide, Picasso, e.t.c.) ○ DownloadManager, Volley ● Integration libraries (Facebook SDK, Twitter Kit, Google Play Service, e.t.c ) ● Analytic, advertising, debug, loggers, test, memory profiling, e.t.c. ● Custom UI components ”Android Performance Workshop” Romain Guy and Chet Haase Devoxx 2013 “External libraries: ● Not necessarily written for Android ● Potentially large expensive for small benefits” “Do not multiply own mistakes by the other people's mistakes” ©Good sense
  • 5. “Commandments” ● Be careful with resources ○ RAM (especially!) ○ Battery ○ CPU/GPU ○ Device memory ○ Network ©”The Art of War” Sun-tzu ● Be respectful to platform ○ Components life cycle ○ Cooperation with environment ○ Fragmentation ● Do everything faster ● “Good things - simple things”
  • 6. Every Device is a Village “... which means that everybody has to cooperate to make the user experience on that device work. You can all make it suck together, or you could make it nice together. Chet Haase Udi Cohen PerformanceDemo
  • 9. Galligan's War Kevin Galligan Blog Droidcon 2015 London “Generally we (touchlab) use ORMlite to build an app without too much concern for performance, then test and improve as needed.” “I’d say if you have serious problems managing raw SQL, you shouldn’t be using SQLite at all. … So, my opinion is that you shouldn’t pick an ORM because its the fastest, but because of its features. However, I would encourage ORM authors to improve their performance where reasonable.” “This also kind of turned into a big talk about Realm, which wasn’t the goal. Outside of the medical study framework, I don’t think we’d be likely to use it in a production app, but we have a lot more sqlite experience in house.” https://github.com/touchlab/android-orm- benchmark-updated
  • 10. Let's check?! Input: ● OS versions: 4.2.2 and 5.1 (Genymotion) ● Device: Nexus 4 ● 10 subscribers x 10 events ● 5 experiments ● 2000 Users ● 20000 Messages Kevin’s My GreenDAO 2.0.0 2.1.0 ORMLite 4.48 4.48 DBFlow 2.0.0 3.0.0-beta5 Squeaky 0.4.0 0.4.0.2 Realm 0.84.1 0.88.0
  • 11. OS Write (ms) Read(ms) W/R (slower) Write (ms) In memory Read(ms) In memory W/R (slower) SQLite 4.2.2 2741 647 2202 532 5.1 1248 365 1153 378 SQLiteX 4.2.2 901 474 867 446 5.1 734 373 721 342 DBFlow 4.2.2 1297 740 1036 640 5.1 1001 514 1101 546 GreenDAO 4.2.2 1256 670 1159 775 5.1 1243 563 956 516 ORMLite 4.2.2 1792 914 1750 902 5.1 1673 621 1560 654 Squidb 4.2.2 1012 454 1015 479 5.1 948 386 780 404
  • 12. OS Write (ms) Read(ms) W/R (slower) Write (ms) In memory Read(ms) In memory W/R (slower) Realm 4.2.2 1257 552 39%/17% 1347 670 55%/50% 5.1 1598 814 117%/118% 1552 803 115%/134% Using the NDK Performantly (Big Android BBQ 2015)
  • 13. What can really help? The Definitive Guide to SQLite Grokking Android
  • 14. URI
  • 17. http://greenrobot.org/eventbus/ What is EventBus? It… ● simplifies the communication between components ● decouples event senders and receivers ● performs well with Activities, Fragments, and background threads ● avoids complex and error-prone dependencies and life cycle issues ● makes your code simpler ● is fast ● is tiny (<50k jar) ● is proven in practice by apps with 100,000,000+ installs ● has advanced features like delivery threads, subscriber priorities, etc. *Almost
  • 18. Let's check?! EventBus Vs LocalBroadcastManager (LBM) Input: ● OS versions: 4.2.2 and 5.1 (Genymotion) ● Device: Nexus 4 ● Event Bus 3.0 ● LocalBroadcastManager 23.2.1 ● Subscriber thread: UI thread ● Sender thread: Worker Thread (IntentService) ● 10 subscribers x 10 events ● 5 experiments* OS Avr. Time (ms) EventBus 4.2.2 1878.8 5.1 540.4 LBM 4.2.2 1508 ~24% faster 5.1 381.6 ~41% faster
  • 22. Results... +2 projects at Google play market He was “surprised” .... Next developer... I think so...
  • 23. Why this can't work good?! ● Inconvenient to support changes in API and backward compatibility ● Lose all benefits for to control on Task stack ● Unreasonable consuming memory ● Lose some cool features (e.g. Android Transition Framework) ● e.t.c.
  • 24.
  • 26. RxAndroid: real solution for unreal problems
  • 27. Problems: ● CPU intensive tasks ● connection to network ● work with files ● long-running activity ● e.t.c Tools: ● Java Threads + concurrency framework ● HaMeR ● AsyncTask ● Loaders ● Services ● JobScheduler ● AlarmManager ● DownloadManager ● e.t.c.
  • 28. Where the place for RxAndroid? https://github.com/googlesamples/android-testing-templates.git
  • 29. “I’m aware of retrolambda, and I think I love the idea. I think it’s wonderful. Before using it, I would go decompile the result of retrolambda to see what exactly happens. Because with lambda, I’ m sure you could have nasty surprises. I’m pretty sure it turns into anonymous classes somewhere, so you might end up with tons of allocations depending on how they’re invoked. For instance, if I pass a lambda in a loop, what happens in terms of allocations? So, I would just go look at the disassembly and see what’s going on before I would decide. You know, the anonymous class could be cached, or it could be reallocated every time, I don’t know. I would have to look at it. It’s one of those cases where it’s important, as software engineers, to try to understand what is going on under the hood before making a decision about how to use it, because you can end up with nasty surprises down the road. And of course, in some cases like if you just using that lambda when you click on a button, that really doesn’t matter, right? Performance is not that big of an issue when you click on a button. Romain Guy
  • 32. TTD Erik Meijer is Dutch computer scientist, the founder of Applied Duality, one of the creators of modern programming languages such as C#. … Unsurprisingly, Meijer has a take on how the development work should be organized and executed. He states that test-driven development should die out – it can’t predict the bugs anyway. – Just push it to production. It will fail, but testing is only about writing tests, not real code. If it breaks, fix it! TDD is for pussies! https://reaktor.com/blog/erik- meijer-software-eating-world/ Android Application Testing Guide
  • 33. compile "com.raizlabs.android:DBFlow-Core:2.2.1" compile "com.raizlabs.android:DBFlow:2.2.1" compile 'com.google.dagger:dagger:2.0' compile 'javax.annotation:jsr250-api:1.0' compile 'com.squareup.retrofit:retrofit:2.0.0-beta2' compile 'com.squareup.retrofit:converter-jackson:2.0.0-beta2' compile 'de.greenrobot:eventbus:2.4.0' compile 'com.birbit:android-priority-jobqueue:1.3.5' compile 'org.apache.commons:commons-lang3:3.4' compile 'com.fasterxml.jackson:jackson-parent:2.6.2' compile 'joda-time:joda-time:2.9.1' apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1' apt 'com.google.dagger:dagger-compiler:2.0' androidTestApt 'com.google.dagger:dagger-compiler:2.0' androidTestCompile 'com.android.support.test:runner:0.4' // Set this dependency to use JUnit 4 rules androidTestCompile 'com.android.support.test:rules:0.4' // Set this dependency to build and run Espresso tests androidTestCompile 'com.android.support.test.espresso: espresso-core:2.2.1' // Set this dependency to build and run UI Automator tests androidTestCompile 'com.android.support.test.uiautomator: uiautomator-v18:2.1.2' androidTestCompile 'com.android.support:support-annotations: 23.1.1' androidTestCompile 'org.mockito:mockito-core:2.0.2-beta' androidTestCompile ('com.android.support.test.espresso: espresso-contrib:2.2.1') { exclude module: 'support-annotations' exclude module: 'support-v4' exclude module: 'support-v13' exclude module: 'recyclerview-v7' https://github.com/yigit/dev-summit-architecture-demo.git “This is not an official Google product. ● The sample app uses many public open source projects. You should not take these as suggestions to use in your app. This demo application is written in a short time and we've used many libraries to make it a complete app as fast as possible. Since this is a demo app, we did not care much about performance characteristics of these libraries. As always, do your due diligence before using any library. ● The models do not cache anything in memory. A real app should. ● There is moderate testing for the project. They are not state of the art testing examples but show how different use cases can be tested.”
  • 34.
  • 35. compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.bumptech.glide:glide:3.5.2' compile 'com.android.support:support-annotations: 22.2.0' compile 'com.android.support:gridlayout-v7:22.2.0' compile 'com.android.support:cardview-v7:22.2.0' compile 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:design:22.2.0' compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.google.android.apps.muzei:muzei-api: 2.0' compile 'com.google.android.gms:play-services-gcm: 8.3.0' compile 'com.google.android.gms:play-services- location:8.3.0' https://github.com/sorinpanduru/sunshine.git https://github.com/googlesamples/android- BasicSyncAdapter.git https://github.com/googlesamples/android-testing- templates.git https://github.com/googlesamples/android-architecture
  • 37. “Programming is not a science. Programming is a craft.” - Richard Stallman
  • 38. Q&A