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 Adding jQuery

fredyrosales
fredyrosales
10,572 Points

Can i use my own text editor in this project?

Do i need to run my own server so i can use my own text editor?

So this is a great question.

You can write in your own text editor. I use a few different ones. I use sublime text, cloud 9, and at work I use notepad++. Basically any project you do here or anywhere can be written in any text editor.

As for "do I need to run my own server", I am not 100% clear on what you mean, but some text editors will run servrside, while others run on your local machine. You can run your project from a browser or on a server such as the workspaces here or on some other virtual machine on a host like digital ocean or one created on workspaces made on Cloud9.

There are several choices. I am not sure on AJAX specifically, but for HTML/CSS/JavaScript, you can save these files straight from a text editor on your computer. Just select File > open from your web browser to run it. You can also copy and paste the javaScript code into the browser console which for most browser's is found at Tools > More Tools > Developer tools > Console tab. This is a great place to test a function to see if it works right.

Also, code challenges can be written in a text editor and copied and pasted into the code challenge. Most text editors will have more tools too, such as code completion (a list of variables in the code so far that you can select one of from when you are writing). In short, there are a lot of options, and pick what works for you.

3 Answers

Damien Watson
Damien Watson
27,419 Points

Hi Fredy,

Doing basic level AJAX, you do need to run this through a server (not sure about jQuery, would guess so). So maybe IIS on PC, or as I'm on Mac and use PHP as well, I just install something like MAMP which installs Apache, MySQL and PHP. Think you can get WAMP for PC.

Or if you have hosting, you can upload and run from there, though not recommended as it's a pain to keep uploading.

I use cloud9, as it integrates an IDE with a temporary host, and automates the saving and uploading. You just create the files, write the code, and hit run. It generates a temporary URL that is running your code. You can check there to see that everything is working as you want. If not, you can just go right back to the IDE and change the code, hit run again, and refresh the tab running your code to see what the effect of the changes you just made. It is pretty convenient.

Damien Watson
Damien Watson
27,419 Points

That sounds pretty nice, haven't used cloud9. I've been using MAMP with Grunt + Watch, SCSS, Angular and playing with NodeJS a little. I find it easier to not have to worry about server and just know it running.

Thats the beauty I guess, so many ways to do things, allows you to find one that works.

Might still have to look into cloud9 tho ;)

Seth Kroger
Seth Kroger
56,414 Points

There are also lighter-weight options like http-server for node.js as well.

Kevin Korte
Kevin Korte
28,149 Points

Mamp will run on Windows now, and I love Cloud9, pick your poison. Both are great!

Damien, I will have to look at the ones you use also. I am always open to new ways of doing something.