Can I say Nodejs is like JVM but for JavaScript? [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
JAVA runs in JVM.
JavaScript runs in NodeJS.
Okay.
So, can I say that NodeJS is like JVM but for JavaScript ?

It isn't, NodeJS is a utility wrapper (and really a necessary one) over the Google's V8 engine, Googles JavaScript runtime.
There are also other issues with this statement as Java is compiled to its own byte code (although you could argue that this would be WASM or V8 byte code) and JavaScript is interpreted.
Despite these differences, NodeJS is like JRE for JS in a practical sense

Related

Why Nest.js claims to be "progressive"? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Just on the first page of Nest, they proudly claim :
A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
The only word I can't grasp is progressive and what that can means in the programming world.
Can anyone explain the concept to me?
According to a Dictionary on the web progressive means happening or developing gradually or in stages.
What I infer from their website about them is "NestJs Takes advantage of latest JavaScript features, bringing design patterns and mature solutions to Node.js world."
and indeed they are doing so by making it more extensible and versatile.
Well, this has nothing to do with PWA(Progressive Web App) Hope this answers your question.

Does the php code always mix with html code? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
In web development, does the backend code always mix with the front code at some point? Checking jsp and some php I see that the code is usually mixed, is this a bad practice or should you always avoid using javascript as an intermediary?
Normally it depends on what you really want to do. But they are usually mixed
PHP was developed as a templating language for web, so basically it is what it was created for. But you might notice that in modern projects PHP used mostly as an API backend for Javascript application. In such cases, it will not be mixed.
It seems to me that it depends on the project type. But even if you do not use modern JS frameworks try to separate business and frontend logic. Check the MVC architecture or DDD.

Are Javascript files interpreted by server before being sent to the client? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I just took a quiz in a computer science class and I got the following question:
Answer the question whether True or False:
The Javascript file is being interpreted by the server before being sent to the client browser window.
I put false, as Javascript in this case because I thought the Javascript file was interpreted on the client side. However, the "correct answer" was true. If someone could explain this I would appreciate it.
JavaScript primarily runs in the browser. Though the quiz could've been referring to a templating engine, in that case, it does evaluate some JS and generates an HTML page. Or perhaps something like server-side rendering with React. In most cases, a JS file for the client is not interpreted by the server.
So unless your class was learning templating engines recently I disagree with this answer too. Ask your professor and let us know why or if it was just an error.

Performance: NaCl vs Emscripten [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How does Google's native client (both NaCl and PNaCl) compare to Emscripten in ported C++ code performance?
The best way to find out is to port something and profile. I have done work with both systems, porting CPU-intensive C/C++ libraries to both NaCl and JS-via-Emscripten. I have found both to be remarkably performant. Not exactly the same as compiled C/C++, but fast enough that they can accomplish their tasks in real-time.

Why are there scripting languages running on web servers? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Can't help myself, but why are there scripting languages such as PHP running on webservers? Why not compiler languages like C? What's the advantage of using a script language on a webserver? Just heard that the biggest part of Facebook was written in PHP. Afterwards the developers introduced HipHop as a Compiler for translating into C.
Why didn't they start to program in C?
Same for client based scripting. What's the reason for using interpreted languages?
Economics. Computer time is cheap. Programmer time is not.
In big conclusion - its more convenient.
Here your can find short and nic article with advantages:
link

Categories

Resources