流星兼容性 [英] Meteor compatibility

查看:65
本文介绍了流星兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用 Meteor 创建我的下一个应用程序,但我之前有几个问题.

I'm thinking of using Meteor to create my next application but I had a few questions before.

  • 据我了解,服务器和客户端之间的通信使用 DDP 协议/WebSockets.哪些浏览器支持 Meteor?

  • From what I understand the communication between the server and the client uses the DDP protocol / WebSockets. What browsers support Meteor ?

Meteor 通信协议和 socket.io 有什么区别?

What's the difference between the Meteor communication protocol and socket.io ?

如果没有区别,有没有可能用socket.io代替原生的Meteor DDP协议/WebSockets?

If there is no difference, is there the possibility to use socket.io instead of the native Meteor DDP protocol / WebSockets ?

Meteor 是否可以与 Yeoman(由 Paul Irish 开发的工作流框架)结合使用?

Is Meteor usable in combination with Yeoman (workflow framework developped by Paul Irish) ?

先谢谢你!

推荐答案

让我们看看我是否可以按照它们出现的顺序回答你的问题...

Let's see if I can answer your questions in the order that they appear...

  • Meteor 支持所有主流浏览器.IE、Chrome、Safari.有关 IE 版本,请参阅上面的 Rahul 指针.
  • socket.io 是一个消息级协议,负责发送、接收和路由消息.相比之下,DDP(Meteor 的协议)是一种更高级别的协议,它对数据库到浏览器的部分复制和 RPC 调用进行建模.事实上,DDP使用幕后消息级协议:sockjs.
  • 打破 Meteor 的消息级传输以实现直接替换目前需要进行一定程度的重构,并且需要使用 Meteor 的源代码.将来,消息级传输可能会封装得更多一些,但 Meteor 通常会在那里提供合理的默认值——可能会也可能不会总是基于 sockjs.
  • 虽然我没有尝试过 Meteor 和 Yeoman 一起使用,但它们涵盖了很多相同的领域.两者都想为您运行本地网络服务器;两者都对您的项目布局有意见,都可以选择缩小您的 javascript,都想管理您的包(Meteor 对此的更多支持正在开发中),都为您的应用程序提供了初始样板,等等.我怀疑它在开发 Meteor 应用时,使用纯 Meteor 工作流程会容易得多.
  • Meteor supports all major browsers. IE, Chrome, Safari. See Rahul's pointer above for versions of IE.
  • socket.io is a message-level protocol, which takes care of sending, receiving, and routing messages. In contrast, DDP (Meteor's protocol) is a higher-level protocol that models partial replication of your database to the browser, and RPC calls. Indeed, DDP uses a message-level protocol under the covers: sockjs.
  • Breaking out Meteor's message-level transport with an aim towards drop-in replacement would currently require some amount of refactoring and getting down and dirty with Meteor's source code. In the future, the message-level transport is likely to be a bit more encapsulated, but Meteor will generally provide a reasonable default there -- which may or may not always be sockjs-based.
  • While I have not tried Meteor and Yeoman together, they cover a lot of the same ground. Both want to run your local webserver for you; both have opinions about the layout of your project, both optionally minify your javascript, both want to manage your packages (more support for this in Meteor is in development), both provide an initial bit of boilerplate for your app, etc. I suspect it would be much easier to use a pure-Meteor workflow when you're developing a Meteor app.

这篇关于流星兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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