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

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.

Yet, we aren't easily amazed. Moore's law has not only affected how fast our computers are, it has significantly increased our expectations as well. We've come to expect wondrous advances, and therefore, what was once amazing has become…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, get ready to regain some of that wonder. A dedicated group of computer scientists, who were determined to make something wondrous, have created a new JavaScript framework called Meteor. You may be thinking, "A new JavaScript framework? That's nothing special." And, if that's all Meteor is, you'd be correct. However, 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 and mobile applications with just a few lines of code.

In the context of modern web applications, it is state-of-the-art. Using established, proven development design patterns, Meteor takes all the mundane parts of building an app and does them all for you. Therefore, you get to focus on building a solid application without getting bogged down with 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. This 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 you'll see how quickly and easily you can build a fully functional and 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 that Meteor uses and see examples of these powerful patterns in action.

Chapter 4, Templates, teaches you about Meteor Templates in depth and uses 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. Implement Meteor's data handling quickly and effectively in your application.

Chapter 6, Application Structure – Client, Server, and Public (oh my!), shows you 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. You will learn how to deploy a Meteor application to your developer, testing, and production environments.

What you need for this book

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

  • Operating systems:

    • Mac OS X 10.7 (Lion) and above versions

    • Linux x86 or x86_64 architectures

    • Windows 7 and above versions

  • Meteor:

    • Meteor version 1.1 or above

The following table will guide you to sites that contain more information:

Who this book is for

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

If you are looking for a step-by-step approach to understand how and when to use one of the most popular and innovative application development frameworks, 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: "The WebElement class also supports find methods to find child elements."

A block of code is set as follows:

<form name="loginForm">
    <label for="username">UserName: </label> <input type="text" class="username" /></br>
    <label for="password">Password: </label> <input type="password" class="password" /></br>
    <input name="login" type="submit" value="Login" />
</form>

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

//Locate all the Checkbox which are checked by calling jQuery find() method.
//find() method returns elements in array
List<WebElement> elements = (List<WebElement>) js.executeScript("return jQuery.find(':checked')");

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

mvn clean test

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: "Right-click to open the pop-up menu and select the Inspect element option."

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 through 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 to our website, or added to any list of existing errata, under the Errata section of that title.

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.