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

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

问题描述

所以我一直在听/读很多关于meteor.js 的内容.教程使它作为一个框架看起来非常运动,但在网络编程方面我仍然有点新手.

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?

推荐答案

一个松散的类比是,Meteor 之于 Node,就像 Rails 之于 Ruby."这是一个大型的、固执己见的框架,在服务器上使用 Node.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.

Meteor 雄心勃勃:默认情况下,它服务的每个页面实际上都是一个与服务器保持同步的 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 处于预览"状态.存在严重的错误,并且某些不符合 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天全站免登陆