VS的NodeJS SignalR:我们为什么需要服务器端的JavaScript? [英] Nodejs vs SignalR: why do we need server-side javascript?

查看:1835
本文介绍了VS的NodeJS SignalR:我们为什么需要服务器端的JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我知道关于Node.js的,我一直是它的粉丝。但是今天我发现了解 SignalR ,它提供了一种替代异步 - 扩展 - ASP.NET的实时模式。

Since I've known about Node.js, I've always been a fan of it. But today I found about SignalR, which provides an alternative asynchronous - scalable - realtime model for ASP.NET.

据我所知,在的Node.js的SignalR的主要优势是共享客户端 - 服务器之间code(另一个优势应该在于它是跨平台),以及SignalR的主要优点是多少更加成熟的框架和更好的工具(IDE)的支持。所以我想:如果SignalR在这里,我们需要的Node.js在Windows上了吗?是否有Node.js的的任何好处,我不知道吗?

As far as I know, the main advantage of Node.js over SignalR is sharing code between client-server (another advantage should be that it is cross-platform), and the main advantage of SignalR is a much more mature framework and far better tool (IDE) support. So I wonder: if SignalR is here, do we need Node.js on Windows anymore? Are there any advantages of Node.js I don't know?

推荐答案

SignalR是Socket.IO和Node.js的一个可行的替代方案还有其他原因使用JavaScript然而,在服务器上。

SignalR is a viable alternative to Socket.IO and Node.js. There are other reasons to use javascript on the server however.


  1. 它变平栈。几乎所有的网站,这些天有可能对浏览器的JavaScript,如果你使用它在服务器上为好,可以切割​​一种语言指出,你必须精通批次。

  1. It flattens the stack. Almost any website these days has to have javascript on the browser, and if you use it on the server as well, you can cut one language out of the batch that you'll have to be proficient in.

消息传递是很自然的。 JSON无处不在!尤其是与使用JSON文件的数据库相结合,通过刚才的所有消息成为JSON对象。这使得减少了在整个系统中发生的消息代理的数量。

Message passing is very natural. JSON Everywhere! Especially combined with a document database which uses JSON, all message passing just becomes JSON objects. This makes reduces the amount of message brokering that has to happen throughout the system.

这不是微软。我个人喜欢微软已经在开发社区完成。他们使梦幻般的工具和各地最好的框架和语言之一。话虽这么说,有些人就是又爱又恨微软。

It's not Microsoft. I personally love what Microsoft has done for the development community. They make fantastic tools and one of the best frameworks and languages around. That being said, some people just love to hate Microsoft.

成本。有很多很好的方法来获得微软工具免费或非常便宜的(前preSS版本和商务星火)。还有与微软的工具工作相关的成本较高。我相信这个代价值得在大多数情况下,生产率的提高,但不是每个人都同意。

Cost. There are many good ways to get Microsoft tools for free or very cheap (Express editions and Biz Spark). There is still a higher cost associated with working with Microsoft tools. I believe this cost is worth the productivity gains in most instances, but not everyone agrees.

在除了上述,还有故事绕来绕去,你不能因线程模型扩展在IIS上长轮询请求。这有一定的道理,但是与好code设计,某些服务器调整,你可以得到大部分解决这些问题。

In addition to the above, there is still the story going around that you can't scale long polling requests on IIS due to the threading model. This has some truth to it, but with good code design, and some server tweaks, you can mostly get around these problems.

这篇关于VS的NodeJS SignalR:我们为什么需要服务器端的JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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