Chapter 7. Exchanging data
This chapter covers
- Publishing Collections without the autopublish package
- Using template-level subscriptions
- Limiting client data with parameterized subscriptions
- Creating a new aggregation data source
- Making a custom data source reactive
- Securing an application with server-side methods
In the early stages of development, it may often be helpful to have the contents of the server database available on the client as well. The increased convenience comes at the price of both performance and security, though. If the idea is to build low-latency and high-performance applications for the web, you must refrain from replicating the entire database on each client. Additionally, sharing all data probably includes sensitive information that should be viewed only by its owner. As a result, you must get rid of the automatic data publication and regain control over all database content.
This chapter introduces two key concepts to working with Meteor: publications and methods (see figure 7.1).