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
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Balancing Empowerment & Direction
lara
5
880
Rails Girls Zürich Keynote
gr2m
96
14k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
The World Runs on Bad Software
bkeepers
PRO
72
12k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
90
Accessibility Awareness
sabderemane
0
49
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
New Earth Scene 8
popppiees
1
1.5k
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
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?