Book Image

Getting Started with Meteor.js JavaScript Framework

By : Isaac Strack
Book Image

Getting Started with Meteor.js JavaScript Framework

By: Isaac Strack

Overview of this book

<p>Meteor is a brand new platform built entirely in JavaScript that allows you to build modern, dynamic web applications in the blink of an eye. With support for nearly every popular JavaScript framework (and more being added every day), Meteor provides you with the ability to quickly and easily develop sophisticated and stylish web applications.<br /><br />"Getting Started with Meteor" is an easy to follow, step-by-step approach to learning how to build modern web applications with Meteor. Through the development of a complete and ready-to-use application, you will experience exactly how easy and fast it can be to develop robust, flexible web applications, so you can build your own “killer” app in no time.<br /><br />"Getting Started with Meteor" will walk you step-by-step through all the major advantages that Meteor has to offer. You’ll be up and running in less than two minutes, and will develop an actual application you can use. As you move quickly through the exercises, you’ll be able to experience first-hand how easy it is to develop in Meteor, and will gain invaluable best practices you can apply immediately to your coding projects.<br /><br />You will learn about reactive programming and how Meteor takes advantage of the latest web technologies. You will gain a solid understanding of what&nbsp; the best design patterns are for developing web apps, and when to use them. You will learn how Meteor uses HTML templates and NoSQL (document-based) databases together to make coding applications simple and fun. Finally, you’ll gain best practices for security and performance, making your web applications fast, secure, and easy to use. If you want to build a web application but hate how difficult it seems to be, this book will show you the easy way to build and deploy modern web apps.<br /><br />This book will teach you everything you need to know to get up and running with Meteor, and start you on your way to becoming an expert web applications developer.</p>
Table of Contents (14 chapters)

Gluing it all together


The View-Model (MVVM) or controller (MVC) or presenter (MVP) is considered the glue of an MV* application model. That's because it "glues" together all the view items, such as buttons or textboxes, to the model.

Pretty fancy explanation, eh? Well, you try to come up with a better explanation for what it does. It really does fill in the cracks, and keep the model and the view together. Someone else invented the term, not us, so let's continue without the Judgy McJudgerson viewpoint, mmmk?

In this section, we'll go through all the changes step-by-step that need to happen inside of ~/Documents/Meteor/LendLib/LendLib.js in order to glue the template and the data model together.

Our items View-Model

In our data model that we created in Chapter 2, Reactive Programming…It's Alive!, we added some sample items when we created a couple of the lists. We did so, if you recall, using the browser console, as follows:

> lists.insert({Category:"DVDs", items: [{Name:"Mission Impossible...