This question already has answers here:
Serverside and clientside javascript
(4 answers)
Closed 9 years ago.
I read this article that says that PayPal may leave Java and go with JavaScript. I was amazed of this, does this mean that JavaScript can be used as a server side language like Python, PHP, etc? What I know about JavaScript is that it is a client side language.
Use Node.js
http://nodejs.org/
Node.js is a platform built on Chrome's JavaScript runtime for easily
building fast, scalable network applications. Node.js uses an
event-driven, non-blocking I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time applications that run
across distributed devices.
Current Version: v0.10.23
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I am new in js and nodejs. I am studing about nodejs in different web sites like w3schools. I learned that nodejs is a kind of server that can run js in the backend of a website . but my mentor told me it is not a server . it is just an engine in the server that can run js. now I am a little confused. I hope someone tell me what exactly nodejs is or tell me a good reference to learn about nodejs.
thank you
Your mentor is wrong, but still kind of right.
Node.js is an open source server environment.
Originally, it came into existence when the developers of JavaScript extended it from something you could only run in the browser to something you could run on your machine as a standalone application.
Nowadays, it's a JavaScript runtime built on Chrome’s V8 JavaScript engine.
Now, this is as you can see indeed a server as it serves your javascript files. However, in difference to a php server, Node.js is designed without threads.
But that doesn't mean you can't take advantage of multiple cores in your environment, and is something I believe your mentor aren't aware of.
Conclusion
Node. js is an application runtime environment that allows you to write server-side applications in JavaScript. Thanks to its unique I/O model, it excels at the sort of scalable and real-time situations we are increasingly demanding of our servers.
It`s an engine that give you possibility to run js scripts in standalone mode. Instead of browser mode.
I agree with #Sergey that node js is engine firstly.
Node.js allows the creation of Web servers and networking tools using JavaScript and a collection of "modules" that handle various core functionalities.Modules are provided for file system I/O, networking (DNS, HTTP, TCP, TLS/SSL, or UDP), binary data (buffers), cryptography functions, data streams, and other core functions. Node.js's modules use an API designed to reduce the complexity of writing server applications.
you can learn about node.js from w3Schools
and Tutorials point are best sites for node.js learning
This question already has answers here:
How to change registry settings on a system through web browser
(4 answers)
Closed 5 years ago.
I am new to penetration testing. My requirement is to update registry values from browser using a client side programming language like javascript. Is it possible?
No, JavaScript can't read / write arbitrary files to the hard disk, copy them or call programs. It does not have direct access to the operating system.
This is done for the security of users, so that an attacker could not use JavaScript to obtain personal data or somehow damage the user's computer.
This question already has answers here:
What is Node.js? [closed]
(10 answers)
Closed 7 years ago.
Okay noob question.
What is node.js?
What is its purpose and where is it used?
They say that it is a server-side technology used to perform parallel operations. Google V8 is the parser and the language is Javascript but I thought that Javascript does not work on server-side. How exactly does node.js do this?
Sorry I tried to look up a good answer for it but I couldn't find any good explanation of node.js. I don't quite get what node.js does from these posts either:
What is Node.js?
What is node.js based on, under the hood?
Node.js is a platform for the JavaScript language that is centered around asynchronous network programming. It contains a set of libraries to help you develop server-side applications with JavaScript
Under the hood, Node.js is running on V8, a JavaScript engine developed by Google.
Hope this helps.
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 9 years ago.
Improve this question
I have read this article (Uses of Javascript), while it is right I know there are other uses of javascript, modern javascript nowadays. I haven't read about node.js and how this one works but I have heard that this one makes js do server-side stuffs?
The question is, what are other uses of javascript, can this replace php and ruby? I know this might not be a good idea for enterprise applications but will work well with medium-size applications, am I right?
What are the other uses of javascript other than the one given in the article?
Javascript can very well be used server side. If you're on an IIS server, you can for example use JScript, nodejs, v8cgi (currently known as TeaJS), or a combination of these. On *nix servers nodejs is a popular framework. Nodejs can even be used to program your own webserver (e.g. using the expressjs framework).
Dive in the given links and see what's possible.
There is TESSEL and Espruino javascript inside microcontroller.
I use Node.js for web application for few years, few projects and really happy so far.
The Express.js + MongoDB makes a perfect match (exactly as PHP + MySQL, 5 years ago). You can find reference on MEAN stack.
It works good no only for small applications. We have medium-size app that could be easily scaled up.
Node.js is not to about substitute PHP or Ruby, but what's happening now is indeed, it's more and more used for web applications nowaday. The reason is simple, Node.js has "web-oriented" core, meaning it's originally created to aim highly productive tcp/http applications. With some progress beautiful web development frameworks appeared on top of Node.js that makes web application development even more easy and fun.
For me, programming Node.js on server makes a lot of sense, since JavaScript is main client-side language (almost without alternatives), so context-switching between client/server programming is less. With practice you get use to some initial JavaScript weirdness and things goes smooth and nice.
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
I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like:
Node.js Rhino SpiderMonkey among others.
Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems easy to use. But some feedback on what you would choose would be great.
Edit:
Some benchmarks for Node.
I'm thinking on going with this one but feedback is still welcome.
Thanks
I think each solution has its own advantages/disadvantages
here a list of SSJS solutions:
Aptana Jaxer:
sadly abandoned
Sitepoint Persevere:
based on rhino -
include JSDB, supports JSON Query -
by Kris Zyp, the author of JSON Schema
RingoJS:
based on rhino -
ex Helma NG successor of Helma which existed from long time ago -
multi-thread -
nice community -
great actor on CommonJS
Narwhal:
can work on either spidermonkey, V8, or webkit JavaScriptCore -
another great actor on CommonJS -
defined the JSGI API in the Jack Server
Joyent NodeJS:
based on V8
(fast) -
all is running in a single thread -
all the code must be written using callbacks -
lot of modules available via npm (Node Package Manager)
4D Wakanda:
based on Webkit JavaScriptCore aka SFX or Nitro (which has been faster than V8 and could be faster again) -
include an NoSQL Object oriented JavaScript datastore with a native REST API -
multi-threaded -
provides a studio with a debugger, a Model Designer, and a GUI Designer -
provides a Framework with Widgets directly bindable to the datastore and between each others
APE project: based on spidermonkey - a Push engine to synchronize in live data between many visitor browsers
10gen MongoDB: A NoSQL Document store allowing code in either Erlang & JavaScript (using spidermonkey)
Apache CouchDB: Another NoSQL Document store also allowing code in either Erlang & JavaScript (using spidermonkey)
See a Server-Side JavaScript presentation with some history, benchmarks, & descriptions
The word server is badly used. Those are different JavaScript implementations.
Personally the only thing I'm doubtful about these implementations is about the low amount of system libraries. Most of them come with standard stuff (sockets, filesystem etc..) but lack support for Threads and concurrency. That's why I usually use Rhino, unless I care for speed.
It might help to describe what problem you are trying to solve. There are a lot of "server-side" JS implementations that fill various needs. An there also several "server" platforms built around these implementations. I wrote one implementation on top of Rhino and Java Servlets, called Myna. Myna is for web applications, and I detailed some of its advantages in another question.
Are you trying to deploy web applications? Are you trying to script existing code? Does your code need to start quickly from a commandline, or is it going to be implemented as a daemon?
There are currently no clear winners in this space that do all of these things well, but there are good choices for specific needs.