Reputation: 5560
I was planning to develop an ecommerce site using Google App Engine in Python. Now, I want to use Ajax for some added dynamic features. However, I read somewhere that I need to know PHP in order to use AJAX on my website. So, is there no way I can use Ajax in Python in Google App Engine? Also, I would be using the webapp2 framework for my application.
Also, if its possible to use Ajax in Google App Engine with Python, can anyone suggest some good tutorials for learning Ajax for the same?
Upvotes: 1
Views: 292
Reputation: 813
AJAX is an asynchronous technique to get the data from server.It is a plain javascript code.
You can use jquery to implement the AJAX calls.
For e.g.
$.ajax({
url:"/test",
type:'GET',
success: function(html){
$('body').append(html);
}
});
This script will make an asynchronous call to the server to the URL(e.g. http://your-app.com/test). Your server should return an html content, which can be appended to the existing page content. Your server can return any type of data i.e. JSON,XML,etc;
Upvotes: 1
Reputation: 961
AJAX has nothing to do with PHP: it's a fancy name for a technique whose goal is to provide a way for the browser to communicate asynchronously with an HTTP server. It is independent of whatever is powering that server (be it PHP, Python or anything).
I fear that you might not be able to understand this yet, so I recommend you to Google about it and experiment a lot before starting your project.
Upvotes: 2