Chinaunix首页 | 论坛 | 博客
  • 博客访问: 662848
  • 博文数量: 102
  • 博客积分: 2585
  • 博客等级: 少校
  • 技术积分: 1115
  • 用 户 组: 普通用户
  • 注册时间: 2005-01-17 02:26
个人简介

IT屌丝一枚

文章分类

全部博文(102)

文章存档

2017年(1)

2016年(1)

2014年(6)

2013年(2)

2012年(1)

2011年(2)

2010年(3)

2009年(3)

2008年(4)

2007年(5)

2006年(40)

2005年(34)

分类: JavaScript

2014-05-15 21:49:57

俺一个刚入门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与底层数据模型自动保持同步。

顺便吐槽一下:cublog是否疯了,标题带了书名《Discover Meteor》就说我卖广告,不解。你不采纳不要紧,别删我帖子啊,我不推荐可以了吧?

阅读(1151) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~