<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tahir Jilani on Medium]]></title>
        <description><![CDATA[Stories by Tahir Jilani on Medium]]></description>
        <link>https://medium.com/@muhammad.jilani?source=rss-a4a94370038c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RWJpczqzWx9BBj2V</url>
            <title>Stories by Tahir Jilani on Medium</title>
            <link>https://medium.com/@muhammad.jilani?source=rss-a4a94370038c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:41:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muhammad.jilani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building SDKs Developers Trust: Lessons from Shipping Software You Don’t Control]]></title>
            <link>https://medium.com/@muhammad.jilani/building-sdks-that-developers-trust-best-practices-for-mobile-web-and-desktop-2cbfc3afb325?source=rss-a4a94370038c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cbfc3afb325</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[Tahir Jilani]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 20:03:29 GMT</pubDate>
            <atom:updated>2026-08-12T20:09:13.142Z</atom:updated>
            <content:encoded><![CDATA[<p>Most software engineers eventually get used to having a certain amount of control over what they build. You know the application architecture, you choose the dependencies, you decide when to release, and when something goes wrong you usually have access to the environment where it happened.</p><p>SDK development changes that relationship completely.</p><p>Once an SDK is integrated into another company’s application, you no longer control the environment around your code. You may not control the framework versions, dependency graph, application lifecycle, networking stack, release schedule or even the order in which your APIs are called.</p><p>Yet when something goes wrong, your SDK is still expected to behave predictably. That is what makes SDK engineering interesting — and sometimes painful.</p><p>Having worked in software engineering since 2008 and spent several years designing and maintaining SDKs for production environments, I have come to see SDK development as much more than creating reusable code. You are effectively building part of someone else’s product, without owning that product.</p><p>That changes the way you have to think about architecture, APIs, security, performance, testing and, perhaps most importantly, developer experience.</p><p>These are some of the lessons I consider most important.</p><h3>A public API should feel boring — in a good way</h3><p>One of the biggest differences between application development and SDK development is the cost of changing your mind.</p><p>Inside an application, an internal interface can often be refactored together with the code that consumes it. If you own both sides, the impact is manageable.</p><p>With an SDK, the consumer belongs to someone else.</p><p>Once developers start building against a public API, method names, data models, callbacks, error types and expected behaviour become part of a contract. Even a seemingly harmless change can require work across dozens or hundreds of integrations.</p><p>That is why I prefer SDK APIs to be deliberately simple.</p><p>The developer integrating the SDK should not need to understand its internal architecture. They should understand what needs to be initialized, what they can call, what they will receive back, and what can go wrong.</p><p>If a developer has to read several pages of documentation just to understand the basic execution flow, the API is probably exposing too much complexity.</p><p>This is also why I am conservative about what becomes public. Internal code can evolve. Public API lives much longer.</p><p>Good API design is not about showing how sophisticated the implementation is. It is about hiding that sophistication behind something predictable.</p><h3>Dependencies deserve much more attention in an SDK</h3><p>Adding a third-party library to an application can be a relatively local decision.</p><p>Adding one to an SDK is not.</p><p>Your dependency enters an application that already has its own dependency graph, and there is a good chance the host application uses some of the same libraries you do.</p><p>That is where apparently unrelated problems start appearing: version conflicts, duplicate classes, increased application size, build failures, unexpected runtime behaviour, or differences between platforms.</p><p>The dependency itself may be perfectly good. The problem is that an SDK cannot assume it owns the environment.</p><p>I have seen this fail in a very practical way. In one case, an SDK relied on an extension API provided by OkHttp. A later version of OkHttp removed that API, and when a host application integrated the newer version, the SDK ended up running against a dependency version different from the one it had been built and tested with. The result was a runtime crash inside the SDK, even though the SDK code itself had not changed. It was a useful reminder that once an SDK enters another application, it does not fully control the versions of the libraries it ultimately runs alongside.</p><p>Over time, experiences like this have made me much more cautious about bringing dependencies into SDKs. The first question is no longer simply, “Does this library solve the problem?” It is also whether the value it provides justifies introducing another assumption into every customer’s application.</p><p>Sometimes a mature external library is absolutely the right choice. Other times, a small abstraction over a platform capability is safer and easier to maintain.</p><p>The important part is making that decision consciously.</p><p>A dependency that saves an SDK team a few days of development can create months of integration friction for its consumers if it is chosen without considering the host environment.</p><h3>Documentation is not separate from the SDK</h3><p>There is a point in many projects where the implementation is complete and someone says, “Now we need to document it.”</p><p>For SDKs, I think that sequence is backwards.</p><p>Documentation is part of the product.</p><p>You can build an elegant SDK internally, but if an external developer cannot integrate it without repeatedly asking your team for help, the developer experience is not complete.</p><p>Good SDK documentation should take someone from zero to a working integration quickly. It needs installation instructions, initialization, the main integration flow, realistic code examples, error handling and guidance for common scenarios.</p><p>Reference documentation still matters, but developers rarely want to begin by reading every class and method. Most want to get something working first and understand the details as they go.</p><p>That is why examples are so valuable.</p><p>A small sample application showing a correct integration can communicate API intent, lifecycle expectations and configuration much faster than pages of prose.</p><p>Documentation also needs to move with the SDK. A code change without the corresponding documentation change is effectively an incomplete release.</p><p>I have found that one of the best tests of SDK usability is simple: give it to an engineer who was not involved in building it and see how far they can get without asking questions.</p><p>Every place they hesitate is useful feedback.</p><h3>The hardest bugs often appear outside your environment</h3><p>An application team can reproduce many problems inside its own test environment.</p><p>SDK teams often do not have that luxury.</p><p>A customer might report that an operation occasionally fails on a particular device, or only after an application has been running for several hours. Another integration may behave differently because of application lifecycle handling, network configuration, threading, dependency versions or platform-specific behaviour.</p><p>You may not have their application source code. You may not have their exact build. In many cases, you will not even have access to the same logs.</p><p>This is why diagnostics need to be designed into an SDK from the beginning.</p><p>That does not mean logging everything. In fact, especially for security-sensitive SDKs, excessive logging can create its own problems.</p><p>The objective is to provide enough context to understand how the SDK reached a particular state without exposing sensitive information.</p><p>Useful diagnostics should help distinguish between configuration errors, network failures, invalid SDK state, environmental issues, security decisions and genuine defects.</p><p>There is a big difference between receiving a report that says “the SDK failed” and being able to identify that initialization completed successfully, a request started, a particular validation stage failed and a well-defined error was returned.</p><p>That difference can turn days of investigation into hours.</p><h3>Performance problems are amplified when you live inside another app</h3><p>An SDK is a guest inside someone else’s application — I think that is a useful principle to keep in mind.</p><p>If an SDK performs expensive work on the main thread, increases startup time, consumes excessive memory, creates unnecessary network traffic or significantly increases binary size, those problems quickly become problems for the host application as well. From the customer’s perspective, it is their application that has become slower or more resource-intensive, regardless of which component caused it.</p><p>Performance therefore needs to be evaluated from the host application’s perspective, not only from inside the SDK.</p><p>That means understanding when initialization happens, avoiding unnecessary work, managing background execution carefully and measuring the overhead the SDK introduces.</p><p>There is also a tendency for SDKs to accumulate functionality over time. Each individual feature may look inexpensive, but several years of incremental additions can produce a very different runtime profile from the SDK that originally shipped.</p><p>Performance testing should therefore be continuous rather than something done once before the first release.</p><p>A successful SDK should add capability to an application without trying to become the application.</p><h3>Security starts with defining the boundary</h3><p>Security becomes particularly important when an SDK participates in authentication, identity, financial transactions or other sensitive workflows.</p><p>It is tempting to approach security as a collection of controls added around an implementation. In practice, I have found it more useful to begin by defining the SDK’s security boundary: what information it genuinely needs, what must be stored, what should remain on the device, and which responsibilities belong to the SDK versus the host application. It is equally important to be explicit about the trust assumptions being made about the environment in which the SDK will run.</p><p>Getting these decisions right early usually leads to a cleaner architecture. Sensitive data should not be collected simply because it might become useful later, and secrets should not be persisted unless there is a genuine need. Where platforms already provide secure storage, hardware-backed key management or appropriate cryptographic primitives, SDKs should take advantage of those capabilities rather than inventing their own mechanisms.</p><p>Security also has to remain practical for the developers integrating the SDK. If the secure implementation requires them to understand a long list of subtle rules, sooner or later someone will get one of those rules wrong. A well-designed SDK should make the secure integration path the natural one.</p><p>This becomes increasingly important when applications operate in environments exposed to runtime manipulation, compromised devices and sophisticated fraud techniques. Security decisions therefore need to hold up outside the controlled environment in which the SDK itself was developed.</p><h3>Backward compatibility is really about customer confidence</h3><p>SDK teams continuously want to improve their APIs. That is healthy.</p><p>The problem is that customers do not necessarily want to update their application every time the SDK team discovers a cleaner architecture.</p><p>Breaking changes have a real cost.</p><p>A customer may need development effort, regression testing, security review and a complete mobile release cycle simply because an SDK changed an interface.</p><p>That does not mean an SDK should never make breaking changes. Sometimes an old design genuinely needs to be replaced.</p><p>But breaking compatibility should be a deliberate product decision, not an accidental side effect of refactoring.</p><p>In many situations, introducing the new behaviour alongside the existing API, marking the older approach as deprecated and providing a clear migration path creates a much better experience.</p><p>Customers also need enough time to move.</p><p>This is where versioning and release communication become part of engineering quality. A version number should communicate the scale of change, and release notes should explain what the change means for someone consuming the SDK.</p><p>Developers should not have to inspect commits to work out whether an upgrade will affect their application.</p><p>Predictable upgrades build trust. Surprise upgrades destroy it very quickly.</p><h3>Cross-platform consistency is about concepts, not identical code</h3><p>Supporting the same product across Android, iOS, Web or desktop introduces a subtle design challenge.</p><p>Users of the SDK expect consistency, but the platforms themselves are not identical.</p><p>Android and iOS have different lifecycle models, security capabilities and programming conventions. Web and desktop environments introduce another set of constraints. Trying to force all of them into exactly the same implementation usually produces APIs that feel unnatural everywhere.</p><p>I prefer to aim for conceptual consistency.</p><p>The same business capabilities should exist across platforms. Initialization should follow a recognizable model. Similar failures should produce understandable equivalents. The major integration flows should feel familiar to a developer moving from one platform to another.</p><p>But the implementation should still respect the platform.</p><p>An Android developer should feel that they are using a well-designed Android library. An iOS developer should feel that they are using a native iOS SDK — not an Android API translated into Swift.</p><p>The challenge is finding the right abstraction boundary between product consistency and platform conventions.</p><p>When that balance is right, documentation also becomes easier because the same concepts can be explained once while platform-specific details remain where they belong.</p><h3>Test the SDK the way customers will actually use it</h3><p>Unit tests tell you whether individual pieces of code behave correctly.</p><p>They do not tell you whether the SDK is pleasant — or even possible — to integrate into a real application.</p><p>That is why integration testing deserves as much attention as internal correctness.</p><p>I like sample applications to be treated as genuine consumers of the SDK rather than disposable demos. They exercise packaging, initialization, dependencies, lifecycle behaviour and common flows in an environment much closer to what customers will experience.</p><p>They can also expose an important category of problems: things that technically work but are unnecessarily difficult to use.</p><p>A method may pass every unit test and still be confusing to integrate correctly.</p><p>Automated component and integration tests are especially useful for SDKs because the number of combinations grows quickly — different operating-system versions, framework versions, configurations and SDK releases.</p><p>You will never reproduce every possible customer environment, but a good test matrix can cover the conditions most likely to expose compatibility problems.</p><p>Testing the SDK in isolation is necessary, but testing it as somebody else’s dependency is what ultimately tells you whether you have built something developers can actually use.</p><h3>Release engineering is part of developer experience</h3><p>Shipping an SDK is not just about producing a technically correct artifact. The way a release reaches developers — its versioning, documentation, migration guidance and compatibility information — is part of their experience with the product.</p><p>This becomes increasingly important as an SDK matures. Customers may be several versions behind, have different release cycles, or depend on behaviour that the SDK team changed months ago. Even a small change can create unexpected work if its impact is not communicated clearly.</p><p>A reliable release process therefore needs both automation and good communication. Builds should be reproducible, tests and quality checks should run consistently, and the artifact published to customers should be the same one that was validated internally. At the same time, release notes should explain changes from the integrator’s point of view — especially when behaviour changes, APIs are deprecated, or an upgrade requires action.</p><p>I have found that developers are generally comfortable with change when it is predictable. What creates frustration is discovering a breaking change during integration or, worse, close to a production release.</p><p>For SDK teams, release engineering is therefore not just an internal delivery process. It is part of how developers judge whether the SDK is dependable.</p><h3>In the end, developers remember whether they can trust it</h3><p>When an SDK is working well, it almost disappears. Teams integrate it, ship their application, and move on. They are not constantly thinking about dependency conflicts, initialization quirks, unexplained failures, or whether the next SDK release will break their build.</p><p>That level of confidence does not come from one clever architectural decision. It develops over time through stable APIs, careful dependency choices, useful documentation, predictable releases, good diagnostics, and security that respects the application hosting the SDK.</p><p>For me, this is one of the biggest differences between building an application and building an SDK. With an application, you usually control the experience end to end. With an SDK, you are asking another engineering team to place your code inside a product they own — and to continue trusting it as their application evolves.</p><p>So the standard has to be higher than simply <strong>“it works.”</strong> A good SDK should be easy to adopt, safe to upgrade, straightforward to troubleshoot, and uneventful to operate.</p><p>When developers stop worrying about your SDK and simply rely on it, you have probably built it well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cbfc3afb325" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>