javascript服务器_服务器端JavaScript会流行吗?

javascript服务器

server-side JavaScript

JavaScript is probably the most widely-used programming language on the planet – nearly every website has a few lines. However, the language is also one of the most misunderstood and often confuses experienced developers: it is not Java, it is not “script”, it does not appear to support Object Orientated Programming, and it can be problematical to get code working in one browser – never mind all of them.

JavaScript可能是地球上使用最广泛的编程语言-几乎每个网站都有几行。 然而,语言也是最容易被误解的一个,经常混淆经验的开发人员:它不是Java,它不是“脚本”,它似乎并不支持面向对象的程序设计,并且它可能是有问题让代码在一个工作浏览器–不用管所有这些。

Much of the pain experienced by web developers is rarely caused by JavaScript itself; DOM manipulation, browser quirks and, until recently, a lack of good development tools and debuggers are the biggest causes of complaint. However, the rise of Ajax and Web2.0 led many developers to ‘rediscover’ the language: it may not be perfect, but it is powerful and provides compelling features such as prototypes, first-class functions, closures, and object literals.

Web开发人员所经历的大部分痛苦很少是由JavaScript本身引起的; DOM操纵,浏览器怪癖以及直到最近才缺乏好的开发工具和调试器是引起投诉的最大原因。 但是,Ajax和Web2.0的兴起使许多开发人员“重新发现”该语言:它可能并不完美,但功能强大,并提供引人注目的功能,例如原型,一流的功能,闭包和对象文字。

Whilst JavaScript engines are available in all but the most basic of web browsers, its use has never become widespread on the web server. There are several server implementations of JavaScript but none could claim to have become mainstream compared to PHP, ASP.NET or even Ruby.

尽管除了最基本的Web浏览器之外,所有其他浏览器都可以使用JavaScript引擎,但从未在Web服务器上广泛使用它。 有几种服务器实现JavaScript,但是与PHPASP.NET甚至Ruby相比,没有一种可以实现成为主流。

However, server-side JavaScript does offer some tantalizing possibilities:

但是,服务器端JavaScript确实提供了一些诱人的可能性:

  • It is one less language to learn and use. Web development typically involves a range of technologies and server-side JavaScript would make the process easier (how many times have you started typing server-side code into JavaScript or vice versa?)

    这是一种较少学习和使用的语言。 Web开发通常涉及多种技术,而服务器端JavaScript将使该过程变得更容易(您已经开始多少次在JavaScript中键入服务器端代码,反之亦然?)
  • The same code could be used on both the client and the server, e.g. form fields could be validated using identical methods.

    可以在客户端和服务器上使用相同的代码,例如,可以使用相同的方法来验证表单字段。
  • JavaScript libraries such as jQuery would work on the server. Features such as server-side DOM manipulation should also be possible.

    jQuery之类的 JavaScript库将在服务器上运行。 服务器端DOM操作等功能也应该是可能的。

  • Web service and Ajax development would be easier, e.g. JSON could be natively handled at either end.

    Web服务和Ajax开发将更加容易,例如JSON可以在任一端进行本地处理。
  • Knowledge could be shared between server and client-side web development experts.

    服务器和客户端Web开发专家之间可以共享知识。

Is JavaScript the right language for the server environment? Can projects such as Jaxer succeed? Are you using it now or planning to in a future project? Should more ISPs offer server-side JavaScript within their hosting plans?

JavaScript是否适合服务器环境的语言? Jaxer等项目能否成功? 您现在正在使用它还是计划在将来的项目中使用它? 是否应该有更多的ISP在其托管计划中提供服务器端JavaScript?

翻译自: https://www.sitepoint.com/server-side-javascript/

javascript服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值