构建基于JavaScript的纯Java应用程序(客户端和服务器端)是否有意义? [英] Does it make sense to build pure JavaScript based web applications (both client and server side)?

查看:120
本文介绍了构建基于JavaScript的纯Java应用程序(客户端和服务器端)是否有意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直认为JavaScript是任何Web应用程序的客户端的一个很好的补充(或者更确切地说,在过去的几年中,作为必备)。即使我开始使用Mootools,它远离DOM操作,并且针对一个通用的OO框架,我仍然认为我不会考虑使用JavaScript进行服务器端开发。 JavaScript属于前面,期间 - 这就是我的想法。

I've always considered JavaScript as a great addition (or rather, for the last couple of years, as a must have) to the client side of any web application. Even when I started to use Mootools, which takes a big step away from DOM manipulation, and aims toward a general purpose, OO framework, I still didn't think that I would consider using JavaScript for server-side development. JavaScript belongs to the front, period - that's what I thought.

嗯,看起来好像是根据一些该死的聪明人,我错了。有史以来第一次,名为Plat_Form的网络开发平台竞赛接受了一个团队,该团队在服务器和客户端使用纯JavaScript 两者。更重要的是,以下是比赛组织者对此所说的话:

Well, it seems like according to some damn smart people, I was wrong. For the first time ever, the web development platform contest called Plat_Form accepted a team that used pure JavaScript both on the server and the client side. What's more, here is what the contest organizers had to say about this:

我们只有一个团队的应用程序,Upstream Agile,可以使用服务器和客户端都有JavaScript。由于这可能成为未来几年的一个主要趋势,我们认为他们的参与是对未来的一瞥,并接受这个团队,即使没有其他人使用这个平台。

所以我的问题是:这真的是一个可行的概念,纯粹在JavaScript上构建多层Web应用程序吗?如果是这样,在前端和后端使用JavaScript会有什么好处?

So my question is: is this really a viable concept, to build multi-tier web applications purely on JavaScript? If so, what would be the advantages of using JavaScript for both the front- and the backend?

编辑: Vanwaril答案中的链接( 为什么node.js非常棒 )在评论部分揭示了值得一读的有趣讨论。我认为,虽然在服务器端使用Javascript是一个可行的概念并且可能有其好处,但我绝对不会开始使用该架构构建企业应用程序。至少现在(是。这个问题可能需要在一年内再次提出,我可以想象答案将在不久的将来发生巨大变化。

The link in Vanwaril's answer (Why node.js is totally awesome) reveals an interesting discussion in the comments section that worth reading through. I, for one, have decided that though using Javascript on the server side is a viable concept and might have its benefits, I would definitely not start building an enterprise application with that architecture. At least for now. This question might need to be asked again in a year, I can imagine that the answer will dramatically change in the near future.

推荐答案

首先,您是否看过节点.js文件? JavaScript是过去几年中发展突飞猛进的语言之一,并且可能会继续增长。

First off, have you taken a look at node.js? JavaScript is one of the languages that, over the last few years, has seen leaps and bounds of development, and its likely to keep growing.

在功能方面,它与其他服务器端技术相比,它不那么成熟,但是活跃的社区使它不甘落后。

In terms of functionality, it is less mature when compared to other server-side technology, but the active community is making it not far behind.

最后,因为它是一种在前面运行的语言和后端,它对代码重用和数据交换格式的影响使应用程序开发更快。

Finally, since its a language that runs on both the front and back-end, its implications for code-reuse and data-exchange formats make application development a whole lot faster.

我不确定它是否已经准备好进行生产(除非您自己愿意为代码库做出贡献),但服务器端JavaScript是一个很好的选择。

I'm not sure its quite ready for production yet (unless you yourself are willing to contribute to the code-base) but server-side JavaScript is a good option to experiment with.

这篇关于构建基于JavaScript的纯Java应用程序(客户端和服务器端)是否有意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆