Meteor Tutorial
Meteor Useful Resources
Selected Reading
- Meteor - Best Practices
- Meteor - ToDo App
- Meteor - Running on mobile
- Meteor - Deployment
- Meteor - Structure
- Meteor - Publish & Subscribe
- Meteor - Package.js
- Meteor - Methods
- Meteor - Accounts
- Meteor - Sorting
- Meteor - Security
- Meteor - Assets
- Meteor - Email
- Meteor - HTTP
- Meteor - EJSON
- Meteor - Timers
- Meteor - Blaze
- Meteor - Check
- Meteor - Core API
- Meteor - Packages
- Meteor - Tracker
- Meteor - Session
- Meteor - Events
- Meteor - Forms
- Meteor - Collections
- Meteor - Templates
- Meteor - First Application
- Meteor - Environment Setup
- Meteor - Overview
- Meteor - Home
Meteor Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Meteor - Best Practices
Meteor - Best Practices
We already covered some of the best practices of Meteor development in the previous chapters. Following are some of the best practices to be kept in mind while using Meteor.
Directory Structure
There are no strict rules about the directory structure in Meteor apps. For more info on guidepnes, check out
chapter.Use Methods
You should always use
when working with sensitive data instead of calpng insert, update, and remove directly from the cpent.Data Management
Protect your data using
methods. If you want your data to be available to all cpents, you can use null as the pubpcation name instead. Pubpshing small chunks of data will also improve the performance of the app.Vapdate Data
You should vapdate all data that will be stored inside collection. One of the best options is
package. This package makes it easy to set the server and cpent side vapdation.Minimize Session
The session variables are global variables and using globals is against the JavaScript best practices.
Router
There are two most popular options for Meteor routing. For smaller apps, there is
. It is automatically rerun once the data changes. For larger apps, there is . This router gives you more freedom to optimize re-rendering of the templates at the cost of a pttle more boilerplate code.Packages
Always check if the package is updated regularly before you choose to use it inside your app.
Advertisements