Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
54
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Developing Libraries is Hard
Why and how to create a library and discuss potential footguns
Domagoj Korman
October 17, 2018
More Decks by Domagoj Korman
See All by Domagoj Korman
Mastering Coordinator Layout
domagojkorman
0
340
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Believing is Seeing
oripsolob
1
240
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Thoughts on Productivity
jonyablonski
76
5.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
KATA
mclloyd
PRO
35
16k
Marketing to machines
jonoalderson
1
5.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Product Roadmaps are Hard
iamctodd
55
13k
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?