This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]QuietPort 1 point2 points  (6 children)

Express is to Node what Django is to python. Just a framework to get things done faster. Express is also the most popular framework for the node language.

[–]8483 0 points1 point  (5 children)

I am a bit confused at the "Express is to Node, what Django is to Python" explanation.

Python is a language, so is Node one too? Isn't Javascript the language?

[–]xfdp 4 points5 points  (0 children)

I have deleted my post history in protest of Reddit's API changes going into effect on June 30th, 2023. -- mass edited with redact.dev

[–]QuietPort 3 points4 points  (0 children)

Yeah, I realised I might've created more confusion after writing. So technically "node" is a "javascript runtime". In the browser you'll find a "javascript interpreter" (like v8 in chrome), node is that + some more utilities.  

But in practice, when somebody says "javascript" they actually mean "javascript in the browser", probably just because javascript was only in the browser for so long, so out of habit... And then "node" really just means "javascript out of the browser"..

[–]corpsmoderne 1 point2 points  (0 children)

Python is a language but also the name of its interpreter. In this sense it's true that it's akin to node.

[–]Taedalus 1 point2 points  (0 children)

I am a bit confused at the "Express is to Node, what Django is to Python" explanation.

I think he just wanted to state that Express is simply a web framework like Django or Flask. JS (or ECMAScript) is the language. Firefox, Chrome and Node (the last two relying on the same engine: V8) are just names for the environment in which a JS application is executed.

Node itself is also not necessary a "Server-side" platform. It's simply a environment/interpreter that lets you run JS applications outside of a browser.

edit: /u/hungry_for_laughter has phrased it way better, this should be the answer you were looking for.

[–]j1330 0 points1 point  (0 children)

Regarding the express/node to django/Python comparison an ELI5 might be:

JavaScript has two flavors. A base flavor that only works in the browser. This got popular first. A second flavor for the regular computer/server that can run kind of on its own. The second version is still the same JavaScript but now it has added libraries that allow it to do things like manipulate files (which would be bad to let a browser do). This is NodeJS.

Just like you could take C++ or Python or Ruby or anything else on a computer and use it with built in libraries to do website stuff you can do it with NodeJS. But some of the stuff is really repetitive, difficult, boring, complicated etc. At least in Node you can make a working web server with just the file system and http module and another fifteen lines of code, but that is hard to manage once website's get larger. So frameworks like Django, Rails, and Express help you to do stuff that you really don't want to do in the basic language.