Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've built a REST API and have been using Backbone models throughout a couple different applications to communicate to it.

I would really like to build a single JS SDK that can be used in any application that contains that reusable code.

I have started by creating an npm, bower, and component.json so that it can be easily installed.

From what I can gather the goal is to create a single object attached to the window for access within other applications. At which point everything in is encapsulated.

I have a couple questions and concerns:

  1. Is there anything I need to avoid to prevent conflicts with other libraries?
  2. How do I handle dependencies? Should I encapsulate them or let the user know they have to add it?
  3. Are there any methods of structuring SDKs that provide similar benefits to, say, MVC within a web app?

NOTE: If this is question doesn't follow the guidelines for programmers.stackexchange.com please provide guidance on how to change it rather than just closing it. Thanks much.

share|improve this question
    
Might be OT, but I've just come across this great video on building SDKs for APIs. –  Whymarrh May 9 at 22:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.