Works on almost all browsers. Implemented getJSON and postJSON methods. For everything else use make();
Example:
var ajax = new MY.VanillaAjax();
ajax.getJSON("http://httpbin.org/get?hello=world", function(data) {
console.log(data);
});
var data = JSON.stringify({
name: "tommy",
pass: "qwerty"
});
ajax.postJSON("http://httpbin.org/post", data, function(data) {
console.log(data);
});
Issues:
var r = new XMLHttpRequest();
r.open("POST", "http://httpbin.org/post", true);
r.setRequestHeader('Content-Type', 'application/json');
r.onreadystatechange = function () {
if (r.readyState !== 4 || r.status !== 200) {
return;
}
console.log(r.responseText);
};
r.send("password=qwerty");
MongoDB is an open source NoSQL database. These days mongodb is getting more popularity between web developers for their processing speed. And for PHP5 we all are aware that it is use widely use for faster development.
sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart
Knockout.js is a javascript library that allows us to bind html elements against any data model. It provides a simple two-way data binding mechanism between your data model and UI means any changes to data model are automatically reflected in the DOM(UI) and any changes to the DOM are automatically reflected to the data model.
Knockout.js is not a replacement of jQuery, Prototype, or MooTools. It doesn’t attempt to provide animation, generic event handling, or AJAX functionality (however, Knockout.js can parse the data received from an AJAX call). Knockout.js is focused only on designing scalable and data-driven UI.
Knockout.js uses a Model-View-ViewModel (MVVM) design pattern in which the model is your stored data, and the view is the visual representation of that data (UI) and ViewModel acts as the intermediary between the model and the view