欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Meteor
小 (→用户系统) |
小 (→简介) |
||
(未显示1个用户的46个中间版本) | |||
第4行: | 第4行: | ||
[[node.js ecosystem|Node.js, Meteor, React.js, AngularJS, JavaScript 和 HTML5 生态系统]] | [[node.js ecosystem|Node.js, Meteor, React.js, AngularJS, JavaScript 和 HTML5 生态系统]] | ||
+ | |||
+ | ==简介== | ||
+ | Meteor 基于 [[Node.js]] 构建,Node.js 是所有 Meteor 应用的服务器引擎,Meteor 深度整合 [[MongoDB]],通过 [[Apache_Cordova]] 支持移动端应用,MIT 许可协议。 | ||
+ | |||
+ | [https://forge.huihoo.com/news/1545 Meteor JavaScript 全栈框架] | ||
==版本== | ==版本== | ||
+ | *[https://blog.meteor.com/announcing-meteor-1-6-abf30f29e2c6 Announcing Meteor 1.6] | ||
+ | *[https://blog.meteor.com/announcing-meteor-1-5-b82be66571bb Announcing Meteor 1.5] | ||
*1.4, Meteor 1.4 will come with Node 4.4.x and Mongo 3.2 | *1.4, Meteor 1.4 will come with Node 4.4.x and Mongo 3.2 | ||
− | *1.3 | + | *1.3, Meteor 1.3 support for ES2015 modules |
*1.2 | *1.2 | ||
第20行: | 第27行: | ||
http://localhost:3000/ | http://localhost:3000/ | ||
meteor deploy try-meteor.meteor.com | meteor deploy try-meteor.meteor.com | ||
+ | |||
+ | 服务端Shell | ||
+ | $ meteor shell | ||
+ | |||
+ | Mongo Shell | ||
+ | $ meteor mongo | ||
+ | 升级 | ||
+ | $ meteor update | ||
+ | $ meteor update --all-packages | ||
==术语表== | ==术语表== | ||
第64行: | 第80行: | ||
==Package== | ==Package== | ||
+ | [https://atmospherejs.com/ Atmosphere] is the catalog for Meteor packages, resources and tools. | ||
+ | |||
[http://zh.discovermeteor.com/chapters/getting-started/ Meteor 中的代码包有点特殊],分为五种: | [http://zh.discovermeteor.com/chapters/getting-started/ Meteor 中的代码包有点特殊],分为五种: | ||
*Meteor 核心代码本身分成多个核心代码包(core package),每个 Meteor 应用中都包含,你基本上不需要花费精力来维护它们 | *Meteor 核心代码本身分成多个核心代码包(core package),每个 Meteor 应用中都包含,你基本上不需要花费精力来维护它们 | ||
第84行: | 第102行: | ||
更多细节:[https://atmospherejs.com/ian/accounts-ui-bootstrap-3 meteor-accounts-ui-bootstrap-3] | 更多细节:[https://atmospherejs.com/ian/accounts-ui-bootstrap-3 meteor-accounts-ui-bootstrap-3] | ||
+ | |||
+ | ==模版== | ||
+ | *[http://zh.discovermeteor.com/chapters/templates/ 了解 Meteor 模版系统] | ||
+ | *[https://github.com/meteor/meteor/tree/devel/packages/spacebars Spacebars 模版语言] | ||
+ | *[https://github.com/meteor/meteor/tree/devel/packages/spacebars-compiler Spacebars 编译器] | ||
+ | *[https://guide.meteor.com/blaze.html Blaze 前端渲染系统] | ||
+ | *[https://github.com/meteor/meteor/tree/master/packages/blaze Blaze 包] [https://github.com/meteor/meteor/tree/devel/packages/templating Templating 包] [https://github.com/meteor/meteor/tree/devel/packages/templating-tools templating-tools 包] | ||
==例子== | ==例子== | ||
第96行: | 第121行: | ||
[[image:angular-meteor-ionic-whatsapp.png]] [http://www.angular-meteor.com/tutorials/whatsapp/ 更多细节>>>] | [[image:angular-meteor-ionic-whatsapp.png]] [http://www.angular-meteor.com/tutorials/whatsapp/ 更多细节>>>] | ||
− | == | + | ==账户系统== |
用户体系、身份认证、允许拒绝、第三方登录 | 用户体系、身份认证、允许拒绝、第三方登录 | ||
[https://github.com/meteor/meteor/tree/master/packages/accounts-base accounts-base] Meteor用户账户系统包含以下包: | [https://github.com/meteor/meteor/tree/master/packages/accounts-base accounts-base] Meteor用户账户系统包含以下包: | ||
− | *accounts-password | + | *accounts-password [https://github.com/meteor/meteor/tree/devel/packages/accounts-password accounts-password 包] |
− | *accounts-facebook | + | *accounts-facebook [https://github.com/meteor/meteor/tree/devel/packages/accounts-facebook accounts-facebook 包] |
− | *accounts-google | + | *accounts-google [https://github.com/meteor/meteor/tree/devel/packages/accounts-google accounts-google 包] |
− | *accounts-github | + | *accounts-github [https://github.com/meteor/meteor/tree/devel/packages/accounts-github accounts-github 包] |
− | *accounts-twitter | + | *accounts-twitter [https://github.com/meteor/meteor/tree/devel/packages/accounts-twitter accounts-twitter 包] |
− | *accounts-meetup | + | *accounts-meetup [https://github.com/meteor/meteor/tree/devel/packages/accounts-meetup accounts-meetup 包] |
− | *accounts-weibo | + | *accounts-weibo [https://github.com/meteor/meteor/tree/devel/packages/weibo weibo 包] |
+ | [https://meteorhacks.com/extending-meteor-accounts/ Extending Meteor Accounts (login system)] | ||
==DDP== | ==DDP== | ||
− | 了解DDP | + | 了解DDP (Distributed Data Protocol) |
*[https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md DDP Specification] | *[https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md DDP Specification] | ||
*[https://meteorhacks.com/discover-meteor-ddp-in-realtime/ Discover Meteor DDP in Realtime] | *[https://meteorhacks.com/discover-meteor-ddp-in-realtime/ Discover Meteor DDP in Realtime] | ||
+ | *[https://github.com/arunoda/meteor-ddp-analyzer Meteor DDP Analyzer] | ||
[https://meteorhacks.com/introduction-to-ddp/ DDP主要做两件事] | [https://meteorhacks.com/introduction-to-ddp/ DDP主要做两件事] | ||
* 处理 Remote Procedure Calls ([[RPC]]) | * 处理 Remote Procedure Calls ([[RPC]]) | ||
第125行: | 第152行: | ||
==MongoDB== | ==MongoDB== | ||
− | [https://github.com/mWater/minimongo Minimongo] | + | [https://github.com/meteor/meteor/tree/master/packages/minimongo Minimongo包] [https://github.com/mWater/minimongo Minimongo] |
*Polling MongoDB every ~10 secs | *Polling MongoDB every ~10 secs | ||
*Using MongoDB oplog | *Using MongoDB oplog | ||
第132行: | 第159行: | ||
> db.posts.find(); | > db.posts.find(); | ||
− | == | + | ==[[RethinkDB]]== |
+ | [https://github.com/Slava/meteor-rethinkdb RethinkDB integration for Meteor] | ||
+ | |||
+ | ==Cassandra== | ||
+ | |||
+ | ==Mobile== | ||
+ | 整合[[ionic]] | ||
*[https://github.com/meteoric/meteor-ionic meteor-ionic] | *[https://github.com/meteoric/meteor-ionic meteor-ionic] | ||
+ | 整合 [[Apache Cordova]] | ||
+ | *[https://guide.meteor.com/mobile.html#introduction Meteor Cordova integration] | ||
+ | |||
+ | ==Scaffolding== | ||
+ | 通过脚手架快速启动Meteor项目: | ||
+ | *[https://github.com/Differential/meteor-boilerplate meteor-boilerplate] | ||
+ | *[https://github.com/iron-meteor/iron-cli iron] | ||
+ | *[https://github.com/themeteorchef/base The Meteor Chef - Base] | ||
+ | |||
+ | ==项目== | ||
+ | *[https://atmospherejs.com/ Atmosphere] is the catalog for Meteor packages, resources and tools. | ||
+ | *[[Meteor Admin]] | ||
+ | *[https://github.com/wekan/wekan Wekan] | ||
+ | *[https://github.com/RocketChat/Rocket.Chat Rocket.Chat]团队通讯 | ||
+ | *[https://github.com/meteoric/meteor-ionic meteor-ionic] [[Ionic]] | ||
*[https://github.com/martijnwalraven/meteor-ios Meteor iOS] | *[https://github.com/martijnwalraven/meteor-ios Meteor iOS] | ||
*[https://github.com/delight-im/Android-DDP Android-DDP] | *[https://github.com/delight-im/Android-DDP Android-DDP] | ||
第143行: | 第191行: | ||
*[https://github.com/arunoda/meteor-up Meteor Up] 通过 Meteor Up 来部署 App | *[https://github.com/arunoda/meteor-up Meteor Up] 通过 Meteor Up 来部署 App | ||
*[https://github.com/sockjs/sockjs-node SockJS] | *[https://github.com/sockjs/sockjs-node SockJS] | ||
+ | *[https://arunoda.github.io/meteor-streams/ Meteor Streams] [https://meteorhacks.com/introducing-meteor-streams/ Introducing Meteor Streams] | ||
+ | *[https://github.com/kadirahq/react-storybook React Storybook] develop and design [[React.js]] UI components [https://medium.com/@arunoda/ec27f28de1e2 Introducing React Storybook] | ||
+ | *[https://github.com/arunoda/meteor-up meteor-up] Production Quality Meteor Deployments | ||
+ | *[https://github.com/ethereum/mist Mist Browser] [[Ethereum]]项目 | ||
==应用== | ==应用== | ||
第169行: | 第221行: | ||
*[https://meteorhacks.com/introducing-multi-core-support-for-meteor/ Introducing Multi-Core Support for Meteor] | *[https://meteorhacks.com/introducing-multi-core-support-for-meteor/ Introducing Multi-Core Support for Meteor] | ||
*[https://meteorhacks.com/making-meteor-500-faster-with-smart-collections/ Making Meteor 500% Faster with Smart Collections] | *[https://meteorhacks.com/making-meteor-500-faster-with-smart-collections/ Making Meteor 500% Faster with Smart Collections] | ||
+ | *[https://galaxy.meteor.com/ Galaxy] [https://galaxy-guide.meteor.com/ The guide for deploying, scaling, and managing Meteor apps on Galaxy] | ||
+ | *[https://bulletproofmeteor.com/ Bullet Proof Meteor Build Fast and Efficient Meteor Apps] | ||
+ | 你也可基于 Meteor Up, Flow Router, Fast Render, SubsManager, and Meteor NPM integration 构建 Meteor 性能运营平台。 | ||
+ | *[https://github.com/zodern/meteor-up Meteor Up] | ||
+ | *[https://github.com/kadirahq/flow-router Flow Router] | ||
+ | *[https://github.com/meteorhacks/fast-render Fast Render] | ||
+ | *[https://github.com/meteorhacks/subs-manager SubsManager] | ||
+ | *[https://github.com/meteorhacks/npm Meteor NPM] | ||
==图集== | ==图集== | ||
<gallery> | <gallery> | ||
+ | image:meteor-stack.png|堆栈 | ||
+ | image:MEAN-stack-vs-Meteor.png|MEAN和Meteor | ||
image:meteor-framework.png|框架 | image:meteor-framework.png|框架 | ||
image:Meteor-Microservices-Architecture.png|微服务架构 | image:Meteor-Microservices-Architecture.png|微服务架构 | ||
+ | image:isomorphic-app.png| isomorphic app | ||
image:meteor-ddp-rpc.png|DDP RPC | image:meteor-ddp-rpc.png|DDP RPC | ||
image:meteor-ddp-manages-data.png|DDP管理数据 | image:meteor-ddp-manages-data.png|DDP管理数据 | ||
+ | image:Meteor-DDP-Analyzer.png|DDP Analyzer | ||
image:meteor-client-server-mongodb.png|C/S MongoDB | image:meteor-client-server-mongodb.png|C/S MongoDB | ||
image:meteor-autopublish.png|Autopublish | image:meteor-autopublish.png|Autopublish | ||
第187行: | 第251行: | ||
image:Meteor-Local-Market-04.png | image:Meteor-Local-Market-04.png | ||
image:Meteor-Todos.png | image:Meteor-Todos.png | ||
+ | image:Meteor-on-FHIR.png|Meteor on FHIR | ||
</gallery> | </gallery> | ||
第195行: | 第260行: | ||
*[https://meteorhacks.com/ MeteorHacks] [https://github.com/meteorhacks MeteorHacks @ GitHub] | *[https://meteorhacks.com/ MeteorHacks] [https://github.com/meteorhacks MeteorHacks @ GitHub] | ||
*[http://www.meteorpedia.com/ Meteorpedia] Meteor的维基百科, [http://www.meteorpedia.com/profile/bt4cayGkw73rxf5Cy Huihoo账户] | *[http://www.meteorpedia.com/ Meteorpedia] Meteor的维基百科, [http://www.meteorpedia.com/profile/bt4cayGkw73rxf5Cy Huihoo账户] | ||
+ | *Meteor founder [https://twitter.com/debergalis Matt Debergalis] | ||
+ | *[http://docs.huihoo.com/meteor Meteor文档] | ||
+ | *[http://zh.discovermeteor.com/ Discover Meteor 中文版] [https://github.com/DiscoverMeteor DiscoverMeteor @ GitHub] | ||
[[category:javaScript]] | [[category:javaScript]] | ||
+ | [[category:node.js]] | ||
+ | [[category:mongoDB]] | ||
[[category:mobile]] | [[category:mobile]] | ||
[[category:cordova]] | [[category:cordova]] | ||
[[category:iOS]] | [[category:iOS]] | ||
[[category:android]] | [[category:android]] |
2022年4月19日 (二) 06:02的最后版本
Meteor, the JavaScript App Platform
Meteor,一个面向Web和App的应用框架和构建平台。
Node.js, Meteor, React.js, AngularJS, JavaScript 和 HTML5 生态系统
目录 |
[编辑] 简介
Meteor 基于 Node.js 构建,Node.js 是所有 Meteor 应用的服务器引擎,Meteor 深度整合 MongoDB,通过 Apache_Cordova 支持移动端应用,MIT 许可协议。
[编辑] 版本
- Announcing Meteor 1.6
- Announcing Meteor 1.5
- 1.4, Meteor 1.4 will come with Node 4.4.x and Mongo 3.2
- 1.3, Meteor 1.3 support for ES2015 modules
- 1.2
[编辑] 指南
curl https://install.meteor.com | /bin/sh meteor create try-meteor cd try-meteor meteor => Started proxy. => Started MongoDB. => Started your app. http://localhost:3000/ meteor deploy try-meteor.meteor.com
服务端Shell
$ meteor shell
Mongo Shell
$ meteor mongo
升级
$ meteor update $ meteor update --all-packages
[编辑] 术语表
- 客户端 Client
当我们谈论客户端时,我们指的是用户的网页浏览器,不论是传统的像 Firebox 或 Safari 的浏览器,或是像在 iPhone 原生应用中的 UIwebView 一样复杂的其他程序。
- 集合 Collection
Meteor 的集合是自动在客户与服务器之间同步的数据源。集合的名称(比如 posts)通常存在于客户端和服务器端。虽然它们表现不同,但是它们有共同的基于 Mongo 的 API。
- Computation
Computation 就是每当响应数据源变化时而运行的代码块。如果你想让一个响应数据源去响应处理(比如,Session 变量),你需要为它来设置一个 computation。
- Cursor
Cursor 是查询 Mongo 集合后的结果。在客户端,cursor 不仅仅是结果的数组,也是一个响应的对象,对应于相关集合的添加、删除和更新对象。
- 分布式数据协议 DDP
DDP 是 Meteor 的分布式数据协议,用来同步集合和调用方法。DDP 的目的是作为一个通用的协议,在大数据的实时应用中起 HTTP 的作用。
- Tracker
Tracker 是 Meteor 响应性系统。Tracker 在后台使 HTML 自动保持与底层数据模型的同步。
- 文档 Document
Mongo 是基于文档(document)的数据库,多个文档组成集合。它们是纯 JavaScript 对象(虽然它们不能包含函数),只有一个 _id 属性,Meteor 用这个属性通过 DDP 跟踪这些对象的属性。
- Helper
当模板需要渲染复杂的多于一个文档属性时,调用 helper 以函数方式来完成渲染任务。
- 延迟补偿 Latency Compensation
延迟补偿是一种在客户端模拟方法调用以避免等待服务器回应的一种技术。
- Meteor Development Group (MDG)
Meteor 开发小组(MDG),开发 Meteor 的公司,区别于这个框架本身。
- 方法 Method
Meteor 方法是一个从客户端到服务器端的远程调用,以一些特别的逻辑保持跟踪集合的更改和允许延迟补偿。
- MiniMongo
客户端的集合,是有类似 Mongo API 并存在内存的数据源。支持这种操作的库叫做“MiniMongo”,是在内存中运行的小版本的 Mongo。
- 代码包 Package
Meteor 代码包可以包含服务器端运行的、客户端运行的 JavaScript 代码,处理资源的说明(比如 SASS 至 CSS),处理的资源。 代码包就像一个超级库。Meteor 自带了很多核心代码包,同时在 Atmosphere 集合了社区提供的第三方代码包。
- 发布 Publication
一个发布就是一套为每个订阅用户而订制的数据。在服务器端设置发布。
- 服务器 Server
Meteor 服务器是运行在 Node.js 之上的 HTTP 和 DDP 服务器。它包含了所有的 Meteor 库,同时也包含了你的服务器端的 JavaScript 代码。当 Meteor 服务器启动时,它会连接 Mongo 数据库(在开发模式时,会自启动)。
- 会话 Session
在 Meteor 中,会话指的是客户端的响应数据源,用来跟踪用户所处的状态。
- Subscription
订阅是为特定客户的发布的连接。订阅是运行在浏览器中的代码,与服务器的发布对话,并保持数据同步。
- 模板 Template
模板就是一个通过 JavaScript 生成 HTML 的方法。Meteor 默认支持 Spacebars 模板系统,但是将来也会支持其他系统。
- 模板数据上下文 Template Data Context
当模板渲染时,它指的是 JavaScript 对象为此次渲染提供特定的数据。通常来说,对象就是纯原始的 JavaScript 对象(POJO),经常也是集合的文档,但是它们也可以变得更复杂,可拥有函数。
[编辑] Package
Atmosphere is the catalog for Meteor packages, resources and tools.
Meteor 中的代码包有点特殊,分为五种:
- Meteor 核心代码本身分成多个核心代码包(core package),每个 Meteor 应用中都包含,你基本上不需要花费精力来维护它们
- 常规 Meteor 代码包称为“isopack”,或同构代码包(isomorphic package,意味着它们既能在客户端也能在服务器端工作)。第一类代码包例如 accounts-ui 或 appcache 由 Meteor 核心团队维护,与 Meteor 捆绑在一起。
- 第三方代码包就是其他用户开发的 isopack 上传到 Meteor 的代码包服务器上。你可以访问 Atmosphere 或 meteor search 命令来浏览这些代码包。
- 本地代码包(local package)是自己开发的代码包,保存在 /packages 文件夹中。
- NPM 代码包(NPM package)是 Node.js 的代码包,虽不能直接用于 Meteor,但可以在上述几种代码包中使用
[编辑] 集成
[编辑] Bootstrap
cd meteor-accounts meteor add twbs:bootstrap meteor add ian:accounts-ui-bootstrap-3 meteor add accounts-password meteor add accounts-github
更多细节:meteor-accounts-ui-bootstrap-3
[编辑] 模版
[编辑] 例子
sudo meteor create --example localmarket cd localmarket meteor sudo meteor create --example todos cd todos meteor
[编辑] 账户系统
用户体系、身份认证、允许拒绝、第三方登录
accounts-base Meteor用户账户系统包含以下包:
- accounts-password accounts-password 包
- accounts-facebook accounts-facebook 包
- accounts-google accounts-google 包
- accounts-github accounts-github 包
- accounts-twitter accounts-twitter 包
- accounts-meetup accounts-meetup 包
- accounts-weibo weibo 包
Extending Meteor Accounts (login system)
[编辑] DDP
了解DDP (Distributed Data Protocol)
- 处理 Remote Procedure Calls (RPC)
- 管理数据
[编辑] MongoDB
- Polling MongoDB every ~10 secs
- Using MongoDB oplog
meteor mongo > db.posts.insert({title: "A new post"}); > db.posts.find();
[编辑] RethinkDB
RethinkDB integration for Meteor
[编辑] Cassandra
[编辑] Mobile
整合ionic
[编辑] Scaffolding
通过脚手架快速启动Meteor项目:
[编辑] 项目
- Atmosphere is the catalog for Meteor packages, resources and tools.
- Meteor Admin
- Wekan
- Rocket.Chat团队通讯
- meteor-ionic Ionic
- Meteor iOS
- Android-DDP
- raix:push Push notifications demo app
- Complete analytics integration for Meteor
- meteor-persistent-session
- meteor-roles
- Accounts-Phone
- Meteor Up 通过 Meteor Up 来部署 App
- SockJS
- Meteor Streams Introducing Meteor Streams
- React Storybook develop and design React.js UI components Introducing React Storybook
- meteor-up Production Quality Meteor Deployments
- Mist Browser Ethereum项目
[编辑] 应用
- relay is a JavaScript framework for building data-driven React applications.
- Meteor for FDA, HIPPA, and HL7 compliant applications
- Top 8 Meteor Open Source Projects
- Reaction Commerce
- DrMongo MongoDB admin app built on Meteor.
- Wekan - Open source Trello-like kanban
- Telescope The React.js + Meteor app platform, Telescope - An open-source social news app built with Meteor
- Orion CMS
- Microscope - The Discover Meteor book's example app
- Pedlar
- Crowducate Platform - Open source education platform Powered by meteor
- GameRaven游戏社区
- Meteorpedia 是 Meteor 的维基百科,基于 Meteor 构建,Meteorpedia的GitHub仓库。
- Kadira - Performance Monitoring for Meteor
- MeteorD - Docker Runtime for Meteor Apps for Production Deployments
- cluster Clustering solution for Meteor with load balancing and service discovery
- npm Complete NPM integration for Meteor
[编辑] 高可用高性能
- Kubernetes: The Future of Cloud Hosting Meteor @ Kubernetes
- Meteor Cluster - Introduction & how it works
- Load Balancing Your Meteor App
- Introducing Multi-Core Support for Meteor
- Making Meteor 500% Faster with Smart Collections
- Galaxy The guide for deploying, scaling, and managing Meteor apps on Galaxy
- Bullet Proof Meteor Build Fast and Efficient Meteor Apps
你也可基于 Meteor Up, Flow Router, Fast Render, SubsManager, and Meteor NPM integration 构建 Meteor 性能运营平台。
[编辑] 图集
[编辑] 链接
- Meteor官网
- Meteor @ GitHub
- Awesome Meteor
- MeteorHacks MeteorHacks @ GitHub
- Meteorpedia Meteor的维基百科, Huihoo账户
- Meteor founder Matt Debergalis
- Meteor文档
- Discover Meteor 中文版 DiscoverMeteor @ GitHub