JavaScript AJAX Basics (retiring) AJAX and APIs Stage 4 Challenge Answer

przink
przink
14,222 Points

Working with the server side of AJAX requests?

So I just finished the AJAX basics course and I am wondering how to proceed if I am interested in learning the server side of AJAX requests.

What I mean by this is when we send an AJAX request to the server, the server does something, then we get the request back. Are there any treehouse courses that I can take that will allow me to learn about what the server is doing and how to write scripts that the server will run when I send an AJAX request?

For example, in one of the first projects in this course where we created the sidebar on the intranet that showed whether employees were in or not, how do we dynamically generate that xml data?

Thanks for the advice!

2 Answers

Sascha Bratton
Sascha Bratton
3,650 Points

Hey Paul,

There's more than one way you could go with this. An AJAX request is just an asynchronous HTTP request.

The "server-side" of this is just an HTTP server. So you would probably want to look at Apache or Nginx.

Beyond that, typically an AJAX request is sent in anticipation of a response. So you would need some application on the server to provide an API via the HTTP server. This could be done in a number of ways, depending on the language you prefer to use.

If you like Ruby, you could check out the Build a Rails API course.

I'm not sure if there are any other specific courses on Treehouse. I know there is an upcoming Python-based course: Build a REST API with Flask

If you are not already familiar with a server-side programming language, such as Node.js or PHP or Ruby or Python or Perl, etc. then you should probably pick one of those and start there.

Aries Gunawan
Aries Gunawan
5,114 Points

Hi Paul,

It will be discussed at the Back-End development track. Try check it out.