Explore our platform and learn how it can help your application shine.
Learn about modern authentication techniques and best practices.
Learn about access management practices and technologies.
Learn to manage user accounts and access at scale.
Understand multi-tenancy, a foundation of shared computing.
Learn how to design and build successful SaaS applications.
Understand what is required to provide an enterprise-ready product.
Understand the uses and benefits of Attribute-Based Access Control.
Learn how Single Sign On (SSO) can improve security and UX.
Learn about OpenID Connect, an open authentication protocol.
Learn about SAML, a popular SSO protocol.
Learn about our history, our team, and our mission.
Creating open-source libraries and SDKs is a distinct endeavor compared to developing applications. It’s an adventure filled with numerous obstacles that demand expertise and experience to navigate effectively.
As the Frontend SDK lead at Frontegg, our mission is to create an open-source library for easy integration of Frontegg components into developers’ applications. Our SDKs include an embedded login box and a robust admin portal, offering extensive user management capabilities on top of our frontend APIs. We provide dedicated SDKs for various frameworks, such as frontegg/react, which is widely adopted by both B2B and B2C frontend developers with 10,000 weekly downloads.
In this blog, I will shed light on the challenges that resonate with my daily experience, challenges that I believe every SDK developer can relate to. Along the way, I’ll provide helpful tips and illustrative examples. Let’s jump in:
Creating an excellent SDK is like juggling. Youn need to keep everything working as before while making constant improvements.
Now, let’s be honest, developers have tight schedules. Asking them to embark on an adventure to upgrade your libraries and actively rework their code is not a great idea. What they truly appreciate is seamless delivery of bug fixes, new features, and slick improvements This approach, while developer-friendly, poses a unique set of challenges for us.
Balancing these factors and managing a single, coherent codebase is crucial for the success of open-source SDK projects. Lets jump to some practical tips to achieve this:
1.Keep it generic and object-oriented
No! (Do not do this)
Try this instead.
2. Think ten features aheadAlways envision what future enhancements might look like for your interface. Consider scalability and potential additions, so your users won’t be caught off guard when new features roll out.
3.Graceful deprecation with configurationsWhen necessary, introduce dedicated configurations to support both forward and backward compatibility. Mark the previous support as @deprecated and provide clear instructions on transitioning to the new implementation.
4. User-friendly “Turn Off” optionOffer your customers a simple way to disable a change if they struggle to integrate a new API seamlessly. Empower them to control the pace of transition.
5.Release breaking changes selectivelyOnly resort to breaking changes when absolutely necessary, and when you do, accompany them with a clear and comprehensive migration guide. Ensure users can smoothly transition to the new version.
6.Embrace API versioningMaintain your APIs with versioning. Clearly define and document different API versions to manage changes effectively.
7. Keep a breaking changes wishlistMaintain a list of potential breaking changes you’d like to introduce when the opportunity arises. This allows you to plan and communicate these changes proactively.
8.Centralize API alignmentStreamline your code by having a central location where you align the API to the latest version. Collect backward-compatible APIs and convert them to the latest format, ensuring that your business logic remains readable and adaptable.
9.Celebrate major updatesEncourage users to upgrade to major versions by offering compelling incentives and rewards.
While some libraries cater to specific frameworks, most aim to be adaptable across a range of technologies. Achieving framework agnosticism is a significant challenge.
The fundamental question arises: Do you prioritize offering the best SDKs for a select few frameworks, guaranteeing an exceptional user experience? Or are you willing to compromise on the SDK development experience in exchange for ensuring that every customer can leverage your remarkable product?
In one of our features, the goal was to provide developers with a way to encapsulate sections of their application that should only be accessible to entitled users. Let’s examine a customized solution approach by focusing on the SDK for our Angular users.
We’ve streamlined the integration process, but it requires a deep understanding of Angular for development and maintenance, dedicated testing, ongoing support, and additional time investment in building the feature initially. This underscores the persistent challenge: each feature necessitates careful deliberation to strike the right balance and effectively deliver value despite having limited resources and expertise.To effectively address the challenge of balancing generic SDK features with framework-specific ones, consider the following strategies:
1.Informed decision making
2.Prioritize essential features
3.Document comprehensively with examples
4.Start with your MVP and gather feedback
These strategies will help you strike the right balance and enhance the effectiveness of your SDK development efforts.
Customers typically expect features to seamlessly integrate with their specific requirements – their application’s styling, brand identity, and user experience. Some customers may prefer extensive customization options to tailor the feature precisely to their unique needs.
At the same time, there are users who value simplicity and efficiency. They trust in best practices and appreciate easy, out-of-the-box solutions. We struggle with this tradeoff on a daily basis. Balancing customization with user-friendly defaults is always a critical consideration in our features.Here is our sign-up form, a built-in component that we provide.
We strike a balance by catering to the most common requests. We provide a comprehensive form built adhering to industry best practices. Additionally, we offer a set of predefined configurations for controlling the layout and form structure. Full styling customization is also available for every component. For those with unique needs, we provide detailed documentation on how to implement a fully customized form using our APIs.
This approach allows us to keep our main component unified, without maintaining a fully dynamic and generic form, while still letting all of our customers have a proper solution for their needs, and even be ready to add additional configurations pretty easily on demand.
Adding a new feature to be exposed in an SDK should meet some basic requirements that allow it to work well in many different situations. To make life easier for your developers, prevent mistakes, save time, encourage more people to contribute, and help different teams collaborate effectively on the same SDK, you should design your infrastructure to handle these basic requirements right out of the box. This means your developers don’t have to worry about these foundational matters, and they can focus on creating and improving specific features.
Let’s use an example from real life:
This automates the process of exposing new APIs to clients. Developers can create new APIs without additional steps, ensuring a smoother development experience.
Building an SDK, especially an open-source one, means that your code can impact millions of end users across various applications. The responsibility of releasing new code to production is immense, as it directly affects your vast user base. To tackle this challenge effectively, you must prioritize quality and reliability in your release pipelines.
We recommend the following best practices:
We’ve now addressed five of the major challenges you’ll encounter in building open-source SDKs.
If you take advantage of these recommendations and best practices, the result will be faster and highly reliable releases to meet the needs of your user base, and protect them from a security standpoint. In addition, you should find that your SDK development processes become more efficient and easier to maintain. We invite you to let us know how they work out for your team, and send us your feedback and suggestions.
The Complete Guide to SaaS Multi-Tenant Architecture
Looking to take your User Management to the next level?
Rate this post
0 / 5. 0
No reviews yet