简介
什么是流星?
流星是一种全栈式JavaScript平台,它是为开发现代的web和移动应用而设计的。流星包含一组重要的技术集,用来构建连接客户端的响应式应用,一个构建工具,和一组从Node.js和JavaScript社区而来的经过策划的包。
流星允许你只使用一种语言来进行开发,那就是JavaScript,它可以用在所有的环境中:应用服务器,web浏览器,以及移动设备。
流星使用数据连线,这意味着服务器发送的是数据,而不是HTML,客户端对其进行渲染。
流星拥抱生态系统,用深思熟虑的方式带来极其活跃的JavaScript社区中的精华。
流星提供全栈式响应性,使你的用户界面能够无缝地反应这个世界的真实状态,却只需要最少量的开发工作量。
什么是流星指南?
这是一组文章用来列出关于使用流星平台进行应用开发方面的最佳实践的建议。我们的目标是能够覆盖对于现代web和移动应用开发中的通用模式,所以,在此撰文的很多概念不仅是流星特定的,而且,可以被用在任意专注在现代的,交互式用户界面的应用中。
本指南中所提及的内容对于构建一个流星应用而言并不是必须的---你完全可以使用与本指南相抵触的规则和模式来使用该平台。然而,本指南意图记录最佳实践和社区规约,我们希望流星社区的大多数能从适配记录的实践中获得收益。
流星平台的API可以在文档站点找到,而且还可以在atmosphere上浏览社区包。
目标听众
本指南面向中级开发者,通常来说,他们应该是熟悉JavaScript,流星平台,和web开发。如果你只是刚开始使用流星,我们推荐从官方教程 开始。
示例应用
很多文章都引用到Todos示例应用程序。伴随着本指南,Todos应用的代码也正在积极地开发中。你可以在GitHub 仓库中查看该应用的源代码,当然,也可以通过拉取请求来发起问题或者提出建议。
本指南的开发
贡献
Ongoing Meteor Guide development takes place in the open on GitHub. We encourage pull requests and issues to discuss problems with and changes that could be made to the content. We hope that keeping our process open and honest will make it clear what we plan to include in the guide and what changes will be coming in future Meteor versions.
Goals of the project
The decisions made and practices outlined in the guide must necessarily be opinionated. Certain best practices will be highlighted and other valid approaches ignored. We aim to reach community consensus around major decisions but there will always be other ways to solve problems when developing your application. We believe it's important to know what the "standard" way to solve a problem is before branching out to other options. If an alternate approach proves itself superior, then it should make its way into a future version of the guide.
An important function of the guide is to shape future development in the Meteor platform. By documenting best practices, the guide shines a spotlight on areas of the platform that could be better, easier, or more performant, and thus will be used to focus a lot of future platform choices.
Similarly, gaps in the platform highlighted by the guide can often be plugged by community packages; we hope that if you see an opportunity to improve the Meteor workflow by writing a package, that you take it! If you're not sure how best to design or architect your package, reach out on the forums and start a discussion.
Future additions
The Meteor Guide will never be done. In particular, it will be updated with new features released in every Meteor version. The current release targets Meteor 1.2.x. There are a few more articles we will add in the coming weeks to align with the Meteor 1.3 release, which will bring ECMAScript module support, seamless NPM integration, improved integration and unit testing, and better mobile features:
- Application structure
- Testing
- Code style and linting
- Forms and user input
- Mobile apps
Other Meteor resources
The place to get started with Meteor is the official tutorial.
Stack Overflow is the best place to ask (and answer!) technical questions. Be sure to add the meteor tag to your question.
Visit the Meteor discussion forums to announce projects, get help, talk about the community, or discuss changes to core.
The Meteor docs is the best place to find the core API documentation of the platform.
Atmosphere is the repository of community packages designed especially for Meteor.
The projects section of the Meteor website describes the projects that make up the Meteor platform.