Book Image

Building Single-page Web Apps with Meteor

By : Fabian Vogelsteller
Book Image

Building Single-page Web Apps with Meteor

By: Fabian Vogelsteller

Overview of this book

Table of Contents (21 chapters)
Building Single-page Web Apps with Meteor
About the Author
About the Reviewers

Chapter 4. Controlling the Data Flow

In the previous chapter, we learned how to store data in our database persistently. In this chapter, we will take a look at how we can tell Meteor what to send to the clients.

Until now, this all worked magically because we used the autopublish package, which synced all of the data with every client. Now, we will control this flow manually, sending only the necessary data to the client.

In this chapter, we'll cover the following topics:

  • Synchronizing data with the server

  • Publishing data to clients

  • Publishing partial collections

  • Publishing only the specific fields of documents

  • Lazy loading more posts


    If you want to jump right into the chapter and follow the examples, download the previous chapter's code examples from either the book's web page at, or from the GitHub repository at

    These code examples will also contain...