We would like to create a JavaScript API, is a jQuery plugin a good choice? -



We would like to create a JavaScript API, is a jQuery plugin a good choice? -

we have android , ios libraries connecting restful web backend. now, considering javascript library. because ouselves using jquery lot considering jquery plugin.

the problem examples have found seem based on modifying dom, e.g. typically functions plugin adds element-centric.

our plugin, in constrast, abstracting ajax calls required. commerce api, have calls (e.g. get):

jquery.ourapigetproduct("12345", { onerror: function(e) {... }, onsuccess: function(e){...} });

the api need initialized base of operations url , credentials, too.

what think? jquery plugins fit, or improve off creatign standalone lib? there tutorials , examples out there network-based jquery/javascript apis?

you should not set plugin methods in jquery.

the reason involve jquery @ take advantage of $.ajax() , homecoming promises.

javascript jquery api

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -