Getting Started with Meteor.js JavaScript Framework
Formats:
save 15%!
save 33%!
Free Shipping!
| Also available on: |
|
- Create dynamic, multi-user web applications completely in JavaScript
- Use best practice design patterns including MVC, templates, and data synchronization
- Create simple, effective user authentication including Facebook and Twitter integration
- Learn the time-saving techniques of Meteor to code powerful, lightning-fast web apps in minutes
Book Details
Language : EnglishPaperback : 130 pages [ 235mm x 191mm ]
Release Date : December 2012
ISBN : 1782160825
ISBN 13 : 9781782160823
Author(s) : Isaac Strack
Topics and Technologies : All Books, Open Source, Web Development
Table of Contents
PrefaceChapter 1: Setup and Installation
Chapter 2: Reactive Programming… It's Alive!
Chapter 3: Why Meteor Rocks!
Chapter 4: Templates
Chapter 5: Data, Meteor Style!
Chapter 6: Application and Folder Structure
Chapter 7: Packaging and Deploying
Index
- Chapter 1: Setup and Installation
- Installing with curl
- Loading an example application
- Selecting your file location
- Loading the example application
- Starting the example application
- Previewing the application
- Help! I made too many changes!
- Making code changes
- Changing from todos to items
- Summary
- Chapter 2: Reactive Programming… It's Alive!
- Creating the Lending Library
- Creating the base application
- Creating a collection
- Fun with the browser console
- Adding some data
- Displaying collections in HTML
- Cleaning up
- Creating a reaction
- Multiple clients
- Summary
- Chapter 3: Why Meteor Rocks!
- Modern web applications
- The origin of the web app (client/server)
- The rise of the machines (MVC)
- The browser grows up (MVVM)
- A giant Meteor appears!
- Cached and synchronized data (the model)
- Templated HTML (the view)
- Meteor's client code (the View-Model)
- Let's create some templates
- Summary
- Chapter 4: Templates
- A new HTML template
- Gluing it all together
- Our items View-Model
- Additional view states
- Adding events
- Model updates
- Style updates
- Summary
- Chapter 5: Data, Meteor Style!
- Document-oriented storage
- But why not use a relational database
- MongoDB
- Using direct commands
- Broadcasting changes
- Published events
- Configuring publishers
- Turning off autopublish
- Listing categories
- Listing items
- Checking your streamlined data
- Summary
- Chapter 6: Application and Folder Structure
- Client and server folders
- Public folder
- Security and accounts
- Removing insecure
- Adding an admin account
- Granting admin permissions
- Customizing results
- Modifying Meteor.publish()
- Adding owner privileges
- Enabling multiple users
- Summary
- Chapter 7: Packaging and Deploying
- Third-party packages
- Listing available packages
- Bundling your application
- Deploying to Meteor's servers
- Updating Meteor's servers
- Using your own hostname
- Deploying to a custom server
- Server setup
- Deploying your bundle
- Optional – different platform
- Running your application
- Summary
Isaac Strack
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 7 submitted: last submission 29 Apr 2013Errata type: Code | Page number: 20
Under the heading "Adding some data", the console commands read:
> lists.insert({Category:"DVDs", items: {Name:"Mission Impossible" ,Owner:"me",LentTo:"Alice"}});
> lists.insert({Category:"Tools", items: {Name:"Linear Compression Wrench",Owner:"me",LentTo: "STEVE"}});
They need to read:
> lists.insert({Category:"DVDs", items: [{Name:"Mission Impossible" ,Owner:"me",LentTo:"Alice"}]});
> lists.insert({Category:"Tools", items: [{Name:"Linear Compression Wrench",Owner:"me",LentTo: "STEVE"}]});
(Added square brackets)
Errata type: Others | Chapter number: 4 | Errata date: 18 Dec 08
The code doesn't work on Mozilla Firefox 18.0.1 on Linux Mint Nadia 64 bit. It's ok on Chrome - same O.S.
Errata type: Others | Chapter 5 - commands 4 & 5 | Errata date: 4-2-2013
In Chapter 5 "Using Direct Commands", the following commands need to be
changed:
db.getCollection('lists')
myLists = db.getCollection('lists')
- CHANGE TO -
db.getCollection('Lists')
myLists = db.getCollection('Lists')
When the Collection was created in Chapter 2 - "Creating a collection", we
called the collection 'Lists':
var lists = new Meteor.Collection("Lists");
Errata type: Others | Page number: Kindle: 1693 of 2131 | Bug in the Chapter 6 source | Errata date: 12-2-2013
You need to use Meteor.userId() instead of this.userId inside your template
event handler:
if (catVal) {
/* lists.insert({Category:catVal,owner:this.userId}); BUG */
lists.insert({Category:catVal,owner:Meteor.userId()}); /* correct */
Session.set('adding_category', false);
}
"this" is not defined in Template.categories.events, so you are reading the
global "window.userId". Somewhat by accident, this ends up partially working
if you just refresh the page. The reason is because even though
window.userId does not exist on first page load, if you click "Refresh", the
Meteor code that tries to login using a login token stored in localStorage
(localstorage_token.js) makes a temporary global "var userId" that is set to
the most recent login userId. So then your code is reading a valid and
current userId.
The bug is most noticeable if you logout and login as someone else without
hitting Refresh. In this case, the insert will be denied because the
"window.userId" is set to the previously logged in user, and not the
currently logged in Meteor.userId()
Errata type: Others | Page number: 45 | Errata date: 14-2-2013
The whole paragraph which begins with: One more thing to add..
and the following code could be removed:
'focusout #add-category': function(e, t) {
Session.set('adding_category', false);
}
Errata type: code | Page number: Chapter 2. Reactive Programming… It's Alive!, Creating a reaction | Errata date: 18 Dec 08
lists.remove({Category:"Fraggles"}) does not work
lists.remove({Category:"Fraggles"})
Error: Not permitted. Untrusted code may only remove documents by ID. [403]
details: undefined
error: 403
errorType: "Meteor.Error"
get stack: function () { [native code] }
message: "Not permitted. Untrusted code may only remove documents by ID.
[403]"
reason: "Not permitted. Untrusted code may only remove documents by ID."
set stack: function () { [native code] }
It works with the following command:
lists.remove({"_id":"o9a5Pmt9k6BYtmqzo"})
The IDs at creation time are as follows:
lists.insert({Category:"Fraggles"});
"AL34d7hB4L9Y7rcpE"
lists.insert({Category:"Fraggles"});
"o9a5Pmt9k6BYtmqzo"
Errata type: Code| Page number: Chapter 2. Reactive Programming… It's Alive!, | Errata date: 18-4-2013
In the example:
var lists = new Meteor.Collection("Lists");
should read instead
lists = new Meteor.Collection("Lists");
The reason is that "...Meteor 0.6 has added file-level JavaScript variable
scoping. Variables declared with var at the outermost level of a JavaScript
source file are now private to that file. Remove the var to share a value
between files."
Sorry, there are currently no downloads available for this title.
- Leverage reactive programming and live HTML in modern web applications
- Design and implement MongoDB/NoSQL databases
- Develop fast, simple web interfaces with HTML templates (Handlebars)
- Use design patterns effectively, including MVC/MVVM and Publisher-Subscriber
- Use local and server synchronization to make apps more user-friendly
- Structure an application for performance and security
- Leverage and integrate user authentication systems (Facebook and Twitter)
- Implement third-party packages and add-ons such as Bootstrap and jQuery
- Deploy and administer Meteor applications
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.
"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.
"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.
You will learn about reactive programming and how Meteor takes advantage of the latest web technologies. You will gain a solid understanding of what 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.
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.
Written in an engaging, easy-to-follow style, "Getting Started with Meteor" is a practical guide for developing modern web applications with Meteor.
This book is for developers or students who have a working knowledge of JavaScript and HTML, and want to learn how to quickly develop web applications using pure JavaScript. A basic understanding of traditional web server development and database methodologies will be helpful, but not necessary. Readers are expected to know how to program basic HTML pages and JavaScript functions, and be familiar with Terminal (basic Shell) commands.

