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)

Preface

We live in amazing times. Advances in medicine, communication, physics, and all other scientific fields provide us with opportunities to create things that were literally impossible to create only a short while ago.

And yet, we aren't easily amazed. We've come to expect wondrous advances, and therefore what was once amazing becomes…well…expected. It's a rare thing, indeed, to find something that takes us by surprise. Something that renews that childhood sense of wonder we all secretly want back, because it was stolen from us.

Well, prepare to regain some of that wonder. A dedicated group of computer scientists who are determined to make something wondrous have created a new JavaScript platform called Meteor. You may be thinking, "A new JavaScript platform? That's nothing special." And if that's all Meteor was, you'd be correct, but fortunately for you, that's not the end of the story.

Meteor is a reactive, simple, and powerful application platform, capable of producing sophisticated, robust web applications with just a few lines of code.

In the context of web applications, it is state-of-the-art. Using established, proven development design patterns, Meteor takes all the difficult and mundane parts of building a web application and does them all for you. You get to focus on building a solid application with all the latest innovations such as reactive programming, templates, plugins, and client-side caching/synchronization. You get to do all of this without getting bogged down in the usual time-wasting activities, such as writing yet-another-database-interface, or learning a new templating engine.

And the best part is, it's simple to learn. Amazingly simple. You will see an application come to life right before your eyes, and when you look back at the number of lines of code it took to create, and compare it to the traditional methods of development, you may actually find yourself saying "wow" or "how did they do that?"

This book will walk you through the major features of Meteor, and show you how to create an application from scratch. By the end of the book, you will have created a working, useful application, and you will have a solid understanding of what makes Meteor different. It may sound like hyperbole, but if you're open to the idea that something innovative and unexpected can qualify as amazing, then prepare to be amazed!

What this book covers

Chapter 1, Setup and Installation, gets you up and running with Meteor in just a few minutes, and shows how quickly and easily you can build a fully functional, useful application.

Chapter 2, Reactive Programming… It's Alive!, teaches you all about reactive programming, and how you can leverage reactivity in Meteor to create amazing, responsive applications.

Chapter 3, Why Meteor Rocks!, helps you to gain an understanding of the design patterns Meteor uses, and shows examples of these powerful patterns in action.

Chapter 4, Templates, teaches you about Meteor templates in depth, and how to use templates to lay the groundwork for your Lending Library application.

Chapter 5, Data, Meteor Style!, helps you to discover how Meteor handles data, making an enterprise-level application incredibly simple and robust. It also helps you to implement Meteor's data handling quickly and effectively in your application.

Chapter 6, Application and Folder Structure, shows what changes you can make to the default configuration to make your application more secure, extensible, and user-friendly.

Chapter 7, Packaging and Deploying, helps you to become an expert on Meteor's packaging system, including how to include many popular third-party frameworks. Learn how to deploy a Meteor application to your development, testing, and production environments.

What you need for this book

To run the examples in the book, the following software will be required:

Who this book is for

This book is for an application developer, designer, or analyst with a decent understanding of HTML and JavaScript, and who wants to learn about Meteor, and the new movement inside the JavaScript community towards fully-functional, robust web applications.

If you are looking for a step-by-step approach to understanding how and when to use one of the latest and most innovative web technologies in your application development projects, this book is for you.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We've already created our categories through the use of the categories template."

A block of code is set as follows:

<body>
  <div id="lendlib">
    <div id="categories-container">
      {{> categories}}
    </div>   
    <div id="list">
      {{> list}} 
    </div> 
  </div> 
</body> 

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<body>
  <div id="lendlib">
    <div id="categories-container">
      {{> categories}}
    </div>   
    <div id="list">
      {{> list}} 
    </div> 
  </div> 
</body>

Any command-line input or output is written as follows:

> meteor remove autopublish

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Before we celebrate, go ahead and click on the Clothes category."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.