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
Developing Libraries is Hard
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Domagoj Korman
October 17, 2018
0
46
Developing Libraries is Hard
Why and how to create a library and discuss potential footguns
Domagoj Korman
October 17, 2018
Tweet
Share
More Decks by Domagoj Korman
See All by Domagoj Korman
Mastering Coordinator Layout
domagojkorman
0
330
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
WENDY [Excerpt]
tessaabrams
9
36k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Ethics towards AI in product and experience design
skipperchong
2
190
Testing 201, or: Great Expectations
jmmastey
46
8k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Side Projects
sachag
455
43k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Skip the Path - Find Your Career Trail
mkilby
0
53
Transcript
Developing Libraries Is Hard DOMAGOJ KORMAN
* * * *
None
* * * * * *
SHOULD I MAKE A LIBRARY?
SHOULD I MAKE A LIBRARY? • Terrible Google API
SHOULD I MAKE A LIBRARY? • Terrible Google API •
Common problems
SHOULD I MAKE A LIBRARY? • Terrible Google API •
Common problems • Outdated existing library
OUR LIBRARY Draw 2D shape
API IMPLEMENTATION CircleDrawer I need I need I need RectangleDrawer
draw() Drawer
draw() API INTERNAL CONFIGURABLE • Prepare canvas • Prepare paint
• Draw shape • Catch/Throw exceptions • Provide paint color • Provide shape
INTERNAL CONFIGURABLE BUILDER setShapeProvider() setPaintProvider() build() PaintProvider ShapeProvider
draw() API INTERNAL CONFIGURABLE PaintProvider ShapeProvider
SHOULD I USE RXJAVA OR KOTLIN?
None
WELL MAYBE
METHOD COUNT RxJava: 10,582 Kotlin-stdlib: 6,106
MULTI-MODULE SETUP
draw() API INTERNAL CONFIGURABLE PaintProvider ShapeProvider
draw() API INTERNAL CONFIGURABLE PaintProvider ShapeProvider rxDraw() RXAPI
class RxApiImpl : RxApi { private val api: Api }
fun rxDraw(): Observable<Event> { api.draw(object: Callback { override fun onSuccess()
= observable.onCompleted() override fun onError(t: Throwable) = observable.onError(t) }) return observable }
fun rxDraw(): Observable<Event> { api.draw(object: Callback { override fun onSuccess()
= observable.onCompleted() override fun onError(t: Throwable) = observable.onError(t) }) return observable }
dependencies { implementation 'co.infinum:draw:1.0.0' implementation 'co.infinum:draw-rx:1.0.0' }
I FINISHED MY LIBRARY. AM I READY TO DEPLOY?
None
LIBRARY Code Tests Documentation (Readme, Javadoc, License) Automated release
README • Quick guide on top - as short as
possible • Complex stuff below
JAVADOC • Add javadoc to public API!
LICENSES Copyleft Permissive GNU GPL MIT Apache
AUTOMATE RELEASE • Gradle Bintray Plugin • Complex to understand
and setup • Awesome documentation • Easy to use after setup
DEPLOY
OUR STUFF https://github.com/infinum/Android-Goldfinger https://github.com/infinum/android-complexify https://github.com/infinum/android_dbinspector https://github.com/infinum/Android-prince-of-versions
Visit infinum.co or find us on social networks: infinum.co infinumco
infinumco infinum Questions?