简体   繁体   中英

What role does Node.js play in MEAN stack between JavaScript and Express compared to Django and Python?

I have background in implementing web applications using Python and its popular framework Django and PostgreSQL. Recently I've shifted my attention from Python to JavaScript and planned to take advantage of the benefits that MEAN stack has to offer.

In terms of backend structure, I understand MongoDB is the database to MEAN just like PostgreSQL (and other relational database) is to Python. Express is the framework just like Django. However, where does Node.js fit into? What does it do? What's the equivalent of Node.js in a Django structure? Why does Django+Python combination not need this "extra" layer of abstraction? What feature(s) do JavaScript lack that it needs this extra layer?

I know it might be a simple question but I'm having a hard time understanding it! Thank you very much in advance!

Node is the interpreter/environment. It's literally the thing that is executing your JavaScript code. I think a better comparison is to think about how the JVM relates to Java

Note that "Javascript" is not in the acronym, whereas with something like LAMP, Python (or PHP or whichever) is. In MEAN, Node.js takes the place of Javascript.

Node.js is basically an interpreter and a runtime environment for Javascript. It is used in the acronym rather than Javascript to distinguish it as separate from browser Javascript. Plus, MEAJ is a pretty horrible acronym.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM