菜鸟硬翻《Discover Meteor》术语表,大家来拍砖

俺一个刚入门Meteor的小菜鸟,硬翻了一下术语表,请各位大虾斧正。

Meteor术语表

集合(Collection)

A Meteor Collection is the data store that automatically synchronizes between client and server. Collections have a name (such as posts), and usually exist both on client and server. Although they behave differently, they have a common API based on Mongo's API.

Meteor集合是在客户端和服务器端之间自动同步的数据储存。集合具有一个名称(例如:posts),而且通常都存在于客户端和服务器端。虽然它们表现不同,但它们都有一个基于Mongo API的通用API。

迷你Mongo(MiniMongo)

The client-side collection is an in-memory data store offering a Mongo-like API. The library that supports this behaviour is called “MiniMongo”, to indicate it's a smaller version of Mongo that runs completely in memory.

客户端集合是一种指向类似Mongo API的内存数据储存。支持此类行为的代码库被称为“迷你Mongo”,这表示它是一个完全运行于内存的小型Mongo数据库。

文档(Document)

Mongo is a document-based data-store, so the objects that come out of collections are called “documents”. They are plain JavaScript objects (although they can't contain functions) with a single special property, the _id, which Meteor uses to track their properties over DDP.

Mongo是一种基于文档的数据储存,因此源自集合的对象被称为“文档”。它们是带有一个特别的 _id 属性的简单Javascript对象(尽管它们不能包含函数),Meteor用该属性通过DDP来跟踪它们其他属性。

分布式数据协议(DDP)

DDP is Meteor's Distributed Data Protocol, the wire protocol used to synchronize collections and make Method calls. DDP is intended as a generic protocol, which takes the place of HTTP for realtime applications that are data heavy.

DDP是指Meteor的分布式数据协议,该连线协议常用于同步集合并产生Method调用。DDP被大量数据的实时应用程序用来作为一种替代HTTP的通用协议。

客户端(Client)

When we talk about the Client, we are referring to code running in the users web browser, whether that is a traditional browser like Firefox or Safari, or something as complex as a UIWebView in a native iPhone application.

当我们谈到客户端(Client)时,我们指的时运行在用户网页浏览器(典型的如:FireFox或Safari,或一些和原生iPhone应用中的UIWebView一样复杂的程序)中的代码。

服务器端(Server)

The Meteor server is a HTTP and DDP server run via node.js. It consists of the all the Meteor libraries as well your server- side JavaScript code. When you start your Meteor server, it connects to a Mongo database (which it starts itself in development).

Meteor服务器是一个通过node.js来运行的HTTP和DDP服务器。它除了由你的服务器端Javascript代码,还有所有的Meteor库组成。当你启动你的Meteor服务器,它会连接到一个Mongo数据库(在开发时它会自启动)。

方法(Method)

A Meteor Method is a remote procedure call from the client to the server, with some special logic to keep track of collection changes and allow Latency Compensation.

Meteor方法(Method)是指一个从客户端到服务器端的远程过程调用,该调用带有一些特别的业务逻辑来保持数据集变更的跟踪并允许延迟补偿(Latency Compansation)。

延迟补偿(Latency Compensation)

Is a technique to allow simulation of Method calls on the client, to avoid lagginess while waiting for the server to respond.

是一种允许在客户端方法(Method)调用的模拟技术,当等待服务器端响应时,它用来避免延迟卡顿。

模板(Template)

A template is a method of generating HTML in JavaScript. By default, Meteor supports Handlebars, a logic-less templating system, although there are plans to support more in the future.

模板是Javascript中用于生成HTML的方法。尽管Meteor计划以后会支持更多的模板,但当前它只默认支持Handlebar,一种无逻辑模板系统。

模板数据上下文(Template Data Context)

When a template renders, it refers to a JavaScript object that provides specific data for this particular rendering. Usually such objects are plain-old-JavaScript-objects (POJOs), often documents from a collection, although they can be more complicated and have functions available on them.

当一个模板渲染时,它指向一个为此次渲染提供特定数据的Javascript对象。尽管这样的对象可以变得更复杂并且可在其上面附带可用的函数,但通常文档来自一个集合,它们是不含业务逻辑的Javascript简单对象(POJO)。

辅助程序(Helpers)

When a template needs to render something more complex than a document property it can call a helper, a function that is used to aid rendering.

当一个模板需要渲染比一个文档属性更复杂的东西时,它可以调用辅助程序,一个常用来帮助渲染的函数。

会话(Session)

The Session in Meteor refers to a client-side reactive data source that's used by your application to track the state that the user's in.

在Meteor中,会话是指一种客户端的响应性数据资源,被你的应用程序用来跟踪用户里的状态。

发布(Publication)

A publication is a named set of data that is customized for each user that subscribes to it. You set up a publication on the server.

发布是一套为每个订阅它的用户定制的数据。你要在服务器上设置一个发布。

订阅(Subscription)

A subscription is a connection to a publication for a specific client. The subscription is code that runs in the browser that talks to a publication on the server and keeps the data in sync.

订阅是一个到相应指定客户端的发布的连接。该订阅是指运行在浏览器中的代码,它与服务器上一个发布进行对话并保持数据同步。

游标(Cursor)

A cursor is the result of running a query on a Mongo collection. On the client side, a cursor isn't just an array of results, but a reactive object that can be observed as objects in the relevant collection are added, removed and updated.

游标是在一个Mongo集合上运行查询后的结果集。在客户端上,游标不仅仅是一个结果集的数组,也是一个能在相关集合做增删改时可被观测的响应对象。

包(Package)

A Meteor package can consist of 1. JavaScript code to run on the server. 2. JavaScript code to run on the client. 3. Instructions on how to process resources (such as SASS to CSS). 4. Resources to be processed.

A package is like a super-powered library. Meteor comes with an extensive set of core packages. There's also Atmosphere, which is a collection of community supplied third party packages.

一个Meteor程序包由以下几方面组成:1. 在服务器端运行的Javascript代码;2. 在客户端运行的Javascript代码;3. 如何处理各类资源的指令(例如:用于CSS的SASS);4. 被处理的各类资源。

一个包类似于一个超强的库。Meteor带来了很多套核心包。还有Atmosphere上一大批社区提供的第三方包

依赖(Deps)

Deps is Meteor's reactivity system. Deps is used behind the scenes to keep HTML automatically sync with the underlying data model.

Deps是Meteor的响应系统。Deps常被用于业务场景后使HTML与底层数据模型自动保持同步。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,233评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,013评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,030评论 0 241
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,827评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,221评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,542评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,814评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,513评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,225评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,497评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,998评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,342评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,986评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,812评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,560评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,461评论 2 266

推荐阅读更多精彩内容