node.js与meteor.js有什么区别? [英] node.js vs. meteor.js what's the difference?

查看:125
本文介绍了node.js与meteor.js有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我一直在听很多关于meteor.js的文章.这些教程使它看起来像框架一样非常运动,但是对于Web编程,我还是一个新手.

So I've been hearing/reading alot about meteor.js. The tutorials make it seem very sporty as a framework, but I'm still a bit of a novice when it comes to web programming.

在过去的一个半月中,我一直在尝试真正地学习node.js并弄清它们是如何结合在一起的.我喜欢启动和运行它的速度和便捷程度,以及它所伴随的社区(以Node可以为之疯狂的框架数量为例).

I've been trying over the last month and half to really learn node.js and figure out how it all comes together. I like the how fast and easy it is to get up and running, and the community that comes along with it (which is exemplified by the mind blowing number of frameworks you can get for Node).

但是流星呢?它的真正优点是什么,有什么区别?有没有人以node.js用户身份开始并转换",还是更多是一个令人好奇的新框架?

But what about meteor? What are the real advantages of it, and what's the difference? Has anyone started as a node.js user and 'converted' or is it still more of a curious new framework?

推荐答案

粗略的比喻是,流星到Node,就像Rails到Ruby."这是一个很大的,固执己见的框架,在服务器上使用Node.节点本身只是一个底层框架,提供了用于发送和接收HTTP请求以及执行其他I/O的功能.

A loose analogy is, "Meteor is to Node as Rails is to Ruby." It's a large, opinionated framework that uses Node on the server. Node itself is just a low-level framework providing functions for sending and receiving HTTP requests and performing other I/O.

流星从根本上雄心勃勃:默认情况下,它所服务的每个页面实际上都是与服务器保持同步的 Handlebars 模板.尝试排行榜示例:您创建了一个模板,该模板仅显示列出名称和分数",并且每当任何客户更改时名称或分数,页面将使用新数据进行更新-不仅针对该客户,还针对查看该页面的每个人.

Meteor is radically ambitious: By default, every page it serves is actually a Handlebars template that's kept in sync with the server. Try the Leaderboard example: You create a template that simply says "List the names and scores," and every time any client changes a name or score, the page updates with the new data—not just for that client, but for everyone viewing the page.

另一个差异:尽管Node本身很稳定并且已在生产中广泛使用,但Meteor处于预览"状态.有严重的错误,并且某些与流星的以数据为中心的概念模型不符的事情(例如动画)很难做到.

Another difference: While Node itself is stable and widely used in production, Meteor is in a "preview" state. There are serious bugs, and certain things that don't fit with Meteor's data-centric conceptual model (such as animations) are very hard to do.

如果您喜欢玩新技术,请试试Meteor.如果您想要基于Node构建的更传统,稳定的Web框架,请查看 Express .

If you love playing with new technologies, give Meteor a spin. If you want a more traditional, stable web framework built on Node, take a look at Express.

这篇关于node.js与meteor.js有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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