I am developing reusable custom components specific to my clients.
jquery plugin pattern is followed in the development.
Simple example below.
(function ($) {
var methods = {
init: function (options) {
},
add: function () {
},
delete: function () {
}
};
$.fn.ns_contactsView = function (method) {
// Method calling logic
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on ns_contactsView ');
}
};
})(jQuery);
this will be used as
$("#divid").ns_contactsView({
contacts:jsonData
})
These are very specific to a particular industry, which will be used only by my clients.
Data input are in json format.
All are cross browser compatible.Themable...
My question is whats the right term to call these components....