开发者

Developing JavaScript APIs by using Third-Party Librarys

开发者 https://www.devze.com 2023-03-02 10:23 出处:网络
I currently want to make my project accessible not only via back-end code (C#, Python, PHP, etc.), so I decided to write an easy and simple JS API, every developer can easily integrate within their we

I currently want to make my project accessible not only via back-end code (C#, Python, PHP, etc.), so I decided to write an easy and simple JS API, every developer can easily integrate within their website / project. Since the whole thing is a service driven system, most of the stuff runs via RPC encoded as JSON.

My problem is, that if I want to make this API I got the following two options:

  1. Writting raw RPC functions from ground up
  2. Using jQuery as third-party library

The big problem with option number 2, which is by far the best option, is that I have to say "dear developer, you need to use jQuery to access my API", which is striking me, since I do开发者_如何转开发 not want to dictate what ppl should or should not use by restricting their opportunities.

Is there a way implementing jQuery's RPC stuff without breaking any other potential JS framework the final developer will use?


if you're worried about the conflict between jquery and other libraries, use jQuery.noConflict() and it solves your problem!
more info at : http://docs.jquery.com/Using_jQuery_with_Other_Libraries

0

精彩评论

暂无评论...
验证码 换一张
取 消