Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) AJAX Concepts A Simple AJAX Example

lesak
lesak
6,260 Points

Webserver Python

Hi. I'm able to setup a local web server using Python on my computer but my hunch is that this won't be enough for AJAX applications. Is this because AJAX applications are dynamic?

2 Answers

lesak
lesak
6,260 Points

Hi Samuel. Thanks for getting back to me. I just gave it a go using the tutorial files and it works. I had read online that Python's SimpleHTTPServer only works for static sites, hence my query. Thanks again for your help.

Samuel Ferree
Samuel Ferree
31,722 Points

AJAX, which stands for Asynchronous JavaScript and XML, is a technology that allows web applications to communicate back and forth between webservers without doing a full page reload.

Provided that you're web app and server agree on how to talk to each other (using something like JSON) python web servers are more than capable of being the backend for an AJAX application.

The server itself isn't enough though. AJAX applications require JavaScript that can be executed on the client side, in the user's browser.

The client side JavaScript can be written using vanilla JavaScript, or with the help of libraries like jQuery, or even with entire frameworks like Angular, Ember, or Redux.