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 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,671 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.