javascript - 是否可以使用 JavaScript 编写后端?

标签 javascript backend

<分区>

众所周知,JavaScript 在网络上很普遍。对于客户端脚本,它做得很好。

但是否可以将 JavaScript 带出浏览器?比如写一个streaming socket或者写DB,做schedule job?后端有这样的东西吗?谢谢。

最佳答案

是的,你可以用 Javascript 做很多后端的事情。

有很多框架和应用程序将 Javascript 作为后端运行,各有优缺点。

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.

关于javascript - 是否可以使用 JavaScript 编写后端?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11652026/

相关文章:

javascript - 正则表达式需要一些帮助

javascript - Prime React 表中的按钮不起作用

javascript - 有关如何为列表项的背景设置动画的建议

javascript - 无法从函数内部更改全局变量的值

javascript - 苹果网络后端技术

javascript - Flask+AJAX+Jquery+JINJA动态更新HTML Table

javascript - 查询没有列 'id' 的 sequelize 表

architecture - 将数据访问层作为与服务层分离的层是否好?

javascript - 使用js将文件从html &lt;input&gt;上传到flask服务器

mysql - Nodejs : MySQL package seems to freeze after a short burt of queries?