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) Programming AJAX Introducing JSON

zabi kadamzadeh
zabi kadamzadeh
5,745 Points

Would it be possible to use node.js for the back-end?

Would it be possible to use node.js for the back-end?

5 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

I'm not sure I understand the question.

Node.js IS part of the backend stack, it makes possible that you may write the entire web application using JavaScript from front to back.

So does this mean that one could create a full web application with a working, secure backend using node and front end js WITHOUT using Python, PHP, Ruby, or another traditional back end language? Sorry if this is a dumb seeming question, but everywhere I look for info about what Node does in laymans terms I keep finding explanations that are loaded with jargon that is difficult for someone who didn't major in computer science.

Kevin Korte
Kevin Korte
28,149 Points

Correct, with node js you can create a full web application with js on the front and back end.

Thanks Kevin!

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Hi Julie Kohler . Dave's exact words in the lecture was

We won't be talking about the back end, the programming you'll use on the server like PHP, Python, or Ruby, that receives the request and sends back a response.

There're 2 key takeaways here, 1. this course is not about back-end at all, and Dave won't be talking about backend; 2. PHP, Python, Ruby were mentioned here as examples of some of the programming languages you may use in the backend, there're certainly many more out there, say, GO, Java, Clojure ... etc are all great choices.

And then for the sake of information accuracy, Dave is absolutely right not to put Node.js into the sentence. PHP, Python, Ruby are programming languages; Node.js is NOT a programming language, it's a JavaScript runtime environment. Many students are already very confused about what Node.js really is, listing Node.js alongside PHP, Python, Ruby will probably give people the false impression that Node is a Programming language as well.

my understanding is that node.js is used on the server side

Many developers don't use node.js on the server side, but they do install Node.js on the development machine and primarily use npm as task runner & package manager.

Julie Kohler
Julie Kohler
6,122 Points

I think Zabi's question needs to be put in the context of this AJAX course. The instructor keeps saying that you could use PHP or Ruby on Rails for the back-end work, but conspicuously doesn't mention node.js. It confused me too since my understanding is that node.js is used on the server side. What explains Dave's omission of it?

Kevin Korte
Kevin Korte
28,149 Points

I don't see a reason why you couldn't use Node for the backend and still ajax to it.

Kevin Korte
Kevin Korte
28,149 Points

Yes, I agree with Willian, Node is a back end framework, like any other.

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

yeah it is a good framework support much things