EFFECTIVELY PRODUCING AND SHIPPING
FRAMEWORKS FOR MULTIPLE PLATFORMS
DONNY WALS
EFFECTIVELY PRODUCING AND SHIPPING FRAMEWORKS FOR MULTIPLE
PLATFORMS
AGENDA
EFFECTIVELY PRODUCING AND SHIPPING FRAMEWORKS FOR MULTIPLE
PLATFORMS
AGENDA
▸ An introduction to SDKs
EFFECTIVELY PRODUCING AND SHIPPING FRAMEWORKS FOR MULTIPLE
PLATFORMS
AGENDA
▸ An introduction to SDKs
▸ Designing an SDK
EFFECTIVELY PRODUCING AND SHIPPING FRAMEWORKS FOR MULTIPLE
PLATFORMS
AGENDA
▸ An introduction to SDKs
▸ Designing an SDK
▸ Distributing your SDK to developers
EFFECTIVELY PRODUCING AND SHIPPING FRAMEWORKS FOR MULTIPLE
PLATFORMS
AGENDA
▸ An introduction to SDKs
▸ Designing an SDK
▸ Distributing your SDK to developers
▸ Closing remarks
AN INTRODUCTION
TO SDKS
SDK
SDK
SOFTWARE DEVELOPMENT KIT
SDK
SOFTWARE DEVELOPMENT KIT
Android SDK
SDK
SOFTWARE DEVELOPMENT KIT
Android SDK iOS SDK
SDK
SOFTWARE DEVELOPMENT KIT
Android SDK iOS SDK
Firebase SDK
SDK
SOFTWARE DEVELOPMENT KIT
Android SDK iOS SDK
Firebase SDK Google Maps SDK
SDK
SOFTWARE DEVELOPMENT KIT
Android SDK iOS SDK
Firebase SDK Google Maps SDK And many others...
SDK
SDK
It's really just a tool that makes it easy to
integrate certain features in your app.
Your project
Your project
Remote server
Your project
Remote server
SDK
Your project
Remote server
SDK
Your project
Remote server
SDK
Complex system
Your project
Remote server
SDK
SDK
Complex system
Your project
Remote server
SDK
SDK
Complex system
Your project
Remote server
SDK
SDK
SDK
Complex system
Low level API
Your project
Remote server
SDK
SDK
SDK
Complex system
Low level API
AN SDK WILL
USUALLY ACT AS
AN INTERFACE
BETWEEN A
COMPLICATED
"THING" AND
YOUR CODE
A GOOD SDK ALLOWS YOU TO TURN THIS
A GOOD SDK ALLOWS YOU TO TURN THIS
CALCULATE SOME
ARBITRARY SIGNATURE
A GOOD SDK ALLOWS YOU TO TURN THIS
CALCULATE SOME
ARBITRARY SIGNATURE
APPLY AUTHENTICATION
A GOOD SDK ALLOWS YOU TO TURN THIS
CALCULATE SOME
ARBITRARY SIGNATURE
APPLY AUTHENTICATION
REFRESH TOKEN AND
RETRY?
INTO THIS
Account services
Media services
Feed services
Push services
etc...
Account services
Media services
Feed services
Push services
etc...
Local store
Filesystem
Account services
Media services
Feed services
Push services
etc...
SDK
Local store
Filesystem
Account services
Media services
Feed services
Push services
etc...
SDK
Local store
Filesystem
Account services
Media services
Feed services
Push services
etc...
SDK
Local store
Filesystem
HOW APPS ARE (OFTEN) DESIGNED
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
HOW APPS ARE (OFTEN) DESIGNED
Designer
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
Javascript
iOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
THE SDK DESIGN PROCESS
JavascriptiOS Android
NATIVE CODE
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
A CONSISTENT
PUBLIC API
MAKES IT EASIER
TO REASON
ABOUT THE WAY
AN SDK SHOULD
BE INTEGRATED.
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
SIMILARITIES IN FIREBASE
THE SDK DESIGN PROCESS
SIMILARITIES IN FIREBASE
▸ All platforms use a set / setValue style syntax
THE SDK DESIGN PROCESS
SIMILARITIES IN FIREBASE
▸ All platforms use a set / setValue style syntax
▸ All platforms must obtain a ref to the database
THE SDK DESIGN PROCESS
SIMILARITIES IN FIREBASE
▸ All platforms use a set / setValue style syntax
▸ All platforms must obtain a ref to the database
▸ The examples all used a similar use case
THE SDK DESIGN PROCESS
THE SDK DESIGN PROCESS
A consistent public API allows app developers
to exchange knowledge about your SDK
regardless of the platform they work on.
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
▸ Describe the feature in detail
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
▸ Describe the feature in detail
▸ Provide as much context as needed / possible
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
▸ Describe the feature in detail
▸ Provide as much context as needed / possible
▸ Link to external documentation and information if possible
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
▸ Describe the feature in detail
▸ Provide as much context as needed / possible
▸ Link to external documentation and information if possible
▸ Stay on point, be concise but also precise
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
Gherkin: GIVEN/WHEN/THEN
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
Gherkin: GIVEN/WHEN/THEN
▸ Given: An account manager instance and valid login
credentials.
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
Gherkin: GIVEN/WHEN/THEN
▸ Given: An account manager instance and valid login
credentials.
▸ When: Calling login() on the account manager with the
correct credentials.
THE SDK DESIGN PROCESS
DESIGNING A NEW FEATURE
Step 1 Step 2 Step 3
Gherkin: GIVEN/WHEN/THEN
▸ Given: An account manager instance and valid login
credentials.
▸ When: Calling login() on the account manager with the
correct credentials.
▸ Then: A LoginResult with a success state should be
returned eventually
DISTRIBUTING
YOUR SDK
DISTRIBUTING YOUR SDK
DISTRIBUTING YOUR SDK
▸ Bump version as needed
DISTRIBUTING YOUR SDK
▸ Bump version as needed
▸ Deploy your SDK update
DISTRIBUTING YOUR SDK
▸ Bump version as needed
▸ Deploy your SDK update
▸ Clearly communicate changes to consumers
DISTRIBUTING YOUR SDK
▸ Bump version as needed
▸ Deploy your SDK update
▸ Clearly communicate changes to consumers
▸ Ensure your documentation is up to date
DISTRIBUTING YOUR SDK
▸ Bump version as needed
▸ Deploy your SDK update
▸ Clearly communicate changes to consumers
▸ Ensure your documentation is up to date
▸ Provide support to consumers
DISTRIBUTING YOUR SDK
BUMPING YOUR SDK VERSION
DISTRIBUTING YOUR SDK
BUMPING YOUR SDK VERSION
▸ Not every platform has to be on the same version.
DISTRIBUTING YOUR SDK
BUMPING YOUR SDK VERSION
▸ Not every platform has to be on the same version.
▸ Don't worry about releasing often, but try to limit your
breaking changes.
DISTRIBUTING YOUR SDK
DEPLOY YOUR SDK UPDATE
DISTRIBUTING YOUR SDK
DEPLOY YOUR SDK UPDATE
▸ Set up CI to distribute your SDK to the distribution channel
of your choice.
DISTRIBUTING YOUR SDK
DEPLOY YOUR SDK UPDATE
▸ Set up CI to distribute your SDK to the distribution channel
of your choice.
▸ Open-source, closed-source, pick the one you need for
your SDK.
DISTRIBUTING YOUR SDK
DEPLOY YOUR SDK UPDATE
▸ Set up CI to distribute your SDK to the distribution channel
of your choice.
▸ Open-source, closed-source, pick the one you need for
your SDK.
▸ Sometimes you need both, for instance when you ship
your SDK to a third party.
DISTRIBUTING YOUR SDK
COMMUNICATE CHANGES
DISTRIBUTING YOUR SDK
COMMUNICATE CHANGES
▸ Use a CHANGELOG.md so it's easy to document changes.
DISTRIBUTING YOUR SDK
COMMUNICATE CHANGES
▸ Use a CHANGELOG.md so it's easy to document changes.
▸ If appropriate, send out an email, slack message or other
notification to your SDK users with changes for the latest
version.
DISTRIBUTING YOUR SDK
COMMUNICATE CHANGES
▸ Use a CHANGELOG.md so it's easy to document changes.
▸ If appropriate, send out an email, slack message or other
notification to your SDK users with changes for the latest
version.
▸ Be clear, and be thorough. These update notes are way
more important than your regular app update notes ("Bug
fixes and other improvements").
DISTRIBUTING YOUR SDK
UPDATE YOUR DOCUMENTATION
DISTRIBUTING YOUR SDK
UPDATE YOUR DOCUMENTATION
▸ Pay extra attention to your code samples and getting
started guides.
DISTRIBUTING YOUR SDK
UPDATE YOUR DOCUMENTATION
▸ Pay extra attention to your code samples and getting
started guides.
▸ Broken documentation is extremely frustrating for people
that use your SDK, especially if they are new.
DISTRIBUTING YOUR SDK
PROVIDE SUPPORT
DISTRIBUTING YOUR SDK
PROVIDE SUPPORT
▸ Set up a Slack channel, mailing list, use Github or anything
else that you think makes sense.
DISTRIBUTING YOUR SDK
PROVIDE SUPPORT
▸ Set up a Slack channel, mailing list, use Github or anything
else that you think makes sense.
▸ Be welcoming and kind, nobody knows your SDK like the
team that built it.
CLOSING
REMARKS
CLOSING REMARKS
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
▸ Your SDK will contain bugs, and developers will tell you about them.
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
▸ Your SDK will contain bugs, and developers will tell you about them.
▸ Be kind to SDK users when they call out for support, they often don't
understand the SDK on the level you do.
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
▸ Your SDK will contain bugs, and developers will tell you about them.
▸ Be kind to SDK users when they call out for support, they often don't
understand the SDK on the level you do.
▸ Avoid staying in "spec review" for too long. Avoid bike-shedding.
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
▸ Your SDK will contain bugs, and developers will tell you about them.
▸ Be kind to SDK users when they call out for support, they often don't
understand the SDK on the level you do.
▸ Avoid staying in "spec review" for too long. Avoid bike-shedding.
▸ Don't rush either, your code directly impacts the quality of apps you
don't control.
CLOSING REMARKS
▸ Just like users, other developers will find ways to use your SDK that
you didn't think were possible.
▸ Your SDK will contain bugs, and developers will tell you about them.
▸ Be kind to SDK users when they call out for support, they often don't
understand the SDK on the level you do.
▸ Avoid staying in "spec review" for too long. Avoid bike-shedding.
▸ Don't rush either, your code directly impacts the quality of apps you
don't control.
▸ Not having any UI to test your code with forces you to write (good)
unit tests, which is very interesting to experience.
EFFECTIVELY PRODUCING AND SHIPPING
FRAMEWORKS FOR MULTIPLE PLATFORMS
DONNY WALS

Effectively Producing And Shipping Frameworks For Multiple Platforms