Is it possible to write the backend using JavaScript?

DNB5brims picture DNB5brims · Jul 25, 2012 · Viewed 66k times · Source

As we all know, JavaScript is widespread on the web. For client side scripting it does a great job.

But is it possible to take JavaScript outside the browser? For example, writing a streaming socket or writing DB, doing schedule job? Things like that in the backend? Thanks.

Answer

Cleric picture Cleric · Jul 25, 2012

Yes, you can do a lot of backend things in Javascript.

There is a lot of frameworks and application that runs Javascript as a backend, all with different pros and cons.

NodeJs

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.

OPA

Opa is an advanced application framework for JavaScript. All aspects are directly written in Opa: Frontend code, backend code, database queries and configuration. And everything is strongly statically typed.

CommonJs

The CommonJS API will fill that gap by defining APIs that handle many common application needs, ultimately providing a standard library as rich as those of Python, Ruby and Java. The intention is that an application developer will be able to write an application using the CommonJS APIs and then run that application across different JavaScript interpreters and host environments.

Vertx.io

Vert.x is the framework for the next generation of asynchronous, effortlessly scalable, concurrent applications. Vert.x is an event driven application framework that runs on the JVM - a run-time with real concurrency and unrivalled performance. Vert.x then exposes the API in Ruby, Java, Groovy, JavaScript and Python. So you choose what language you want to use. Scala and Clojure support is on the roadmap too.