Book Image

Meteor Design Patterns

By : Reyna
Book Image

Meteor Design Patterns

By: Reyna

Overview of this book

With the increasing interest in NodeJS web applications, a new framework, Meteor, has joined the ranks to simplify developer workflows. Meteor is one of the few open source frameworks that has received funding since its early development stages. It builds on ideas from existing frameworks and libraries, offering developers an easy way to develop a prototype app. At the same time, it gives them the tools and flexibility to build a fully fledged production app. Meteor is the weapon of choice for start-ups in today’s world. Meteor Design Patterns cuts through the jargon that most websites play with and gets to the point with simple solutions that will boost your development skills. We start off with a refresher on the basics of JavaScript programming such as templates, CoffeeScript, the Event Loop, and the Merge Box, amongst others. You then learn how to map real-world data and optimize the data’s publishers to output data with the least amount of work done by the server with some subscribe and publish patterns. Next, using front-end patterns, you will learn how to create maintainable and trackable forms, and make our site crawlable by any search engine. Following this, you will see how to optimize and secure the web application and maintain applications without breaking other features. Finally, you will learn how to deploy a secure production-ready application while learning to set up modulus, compose with Oplog tracking and SSL certificates, as well as error tracking with Kadira. Throughout the book, you will put your skills to practice and build an online shop from scratch. By the end of the book, you will have built a feature-rich online shop.
Table of Contents (8 chapters)

Setting up Kadira


Perfect! Now that we can deploy production quality web applications, we need to understand how to identify issues with them. This is where kadira.io comes into the picture. Kadira is a Meteor-specific performance and error-monitoring tool. It will collect Meteor.Errors triggered on both the client and the server. It will also show performance data for publishers and subscribers.

Kadira does this and more, and the starting plan is completely free. Let's begin by signing up. After you have signed up, you need to create a new app:

Decide a name for the app, and enter the same in the field, and click on Create App:

Once created, you will see a view like this:

To finish, you will need to copy the code in step 2 and install the meteorhacks:kadira and meteorhacks:zones packages:

meteor add meteorhacks:kadira
meteor add meteorhacks:zones

The meteorhacks:zones package improves the description of the errors from the client side. Kadira will take advantage of this package automatically...