-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-introduction.md.erb
112 lines (63 loc) · 7.99 KB
/
01-introduction.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
title: Introduction
slug: introduction
date: 0001/01/01
number: 1
level: free
photoUrl: http://www.flickr.com/photos/62303607@N00/7779436538/
photoAuthor: Richard
contents: Learn what makes Meteor special.|Read about the story of this book.|Learn how this book is organized.
paragraphs: 35
---
Do a little mental experiment for me. Imagine you're opening the same folder in two different windows on your computer.
Now click inside one of the two windows and delete a file. Did the file disappear from the other window as well?
You don't need to actually do these steps to know that it did. When we modify something on our local filesystems, the change is applied everywhere without the need for refreshes or callbacks. It just happens.
However, let's think about how the same scenario would play out on the web. For example, let's say you opened the same WordPress site admin in two browser windows and then created a new post in one of them. Unlike on the desktop, no matter how long you wait, the other window won't reflect the change unless you refresh it.
Over the years, we've gotten used to the idea that a website is something that you only communicate with in short, separate bursts.
But Meteor is part of a new wave of frameworks and technologies that are looking to challenge the status quo by making the web real-time and reactive.
### What is Meteor?
Meteor is a platform built on top of Node.js for building real-time web apps. It's what sits between your app's database and its user interface and makes sure that both are kept in sync.
Since it's built on Node.js, Meteor uses JavaScript on both the client and on the server. What's more, Meteor is also able to share code between both environments.
The result of all this is a platform that manages to be very powerful and very simple by abstracting away many of the usual hassles and pitfalls of web app development.
### Why Meteor?
So why should you spend your time learning Meteor rather than another web framework? Leaving aside all the various features of Meteor, we believe it boils down to one thing: Meteor is easy to learn.
More so than any other framework, Meteor makes it possible to get a real-time web app up and running on the web in a matter of hours. And if you've ever done front-end development before, you'll already be familiar with JavaScript and won't even need to learn a new language.
Meteor might be the ideal framework for your needs, or then again it might not. But since you can get started over the course of a few evenings or a week-end, why not try it and find out for yourself?
### Why This Book?
For the past couple years, we've been working on numerous Meteor projects, spanning the range from web to mobile apps, and from commercial to open-source projects.
We learned a ton, but it wasn't always easy to find the answers to our questions. We had to piece things together from many different sources, and in many cases even invent our own solutions. So with this book, we wanted to share all these lessons, and create a simple step-by-step guide that will walk you through building a full-fledged Meteor app from scratch.
The app we'll be building is a simplified version of a social news site like [Hacker News](http://news.ycombinator.com) or [Reddit](http://reddit.com), which we'll call Microscope (by analogy with its big brother, Meteor open-source app [Telescope](http://telesc.pe)). While building it, we'll address all the different elements that go into building a Meteor app, such as user accounts, Meteor collections, routing, and more.
### Who Is This Book For?
One of our goals while writing the book was to keep things approachable and easy to understand. So, you should be able to follow along even if you have no experience with Meteor, Node.js, MVC frameworks, or even server-side coding in general.
On the other hand, we do assume familiarity with basic JavaScript syntax and concepts. But if you've ever hacked together some jQuery code or played around with the browser's developer console, you should be OK.
If you're not that comfortable with JavaScript yet, we suggest checking out our [JavaScript primer for Meteor](https://www.discovermeteor.com/blog/javascript-for-meteor/) before getting started with the book.
### About the Authors
In case you're wondering who we are and why you should trust us, here is a little more background on both of us.
<%= image "tom-photo.jpg", "portrait" %>
**Tom Coleman** founded [Percolate Studio](http://percolatestudio.com/), a web development shop with a focus on quality and user experience, was one of the creators of the [Atmosphere](http://atmosphere.meteor.com) package repository, and is also one of the brains behind many other Meteor open-source projects. He now works full-time for the Meteor Development Group.
<%= image "sacha-photo.jpg", "portrait" %>
**Sacha Greif** has worked with startups such as [Hipmunk](http://hipmunk.com) and [RubyMotion](http://rubymotion.com) as a product and web designer. He's the creator of [Telescope](http://telescopeapp.org) and [Sidebar](http://sidebar.io) (which is based on Telescope).
### Chapters & Sidebars
We wanted this book to be useful both for the novice Meteor user and the advanced programmer, so we split the chapters into two categories: regular chapters (numbered 1 through 14) and sidebars (.5 numbers).
Regular chapters will walk you through building the app, and will try to get you operational as soon as possible by explaining the most important steps without bogging you down with too much detail.
On the other hand, sidebars will go deeper into Meteor's intricacies, and will help you get a better understanding of what's really going on behind the scenes.
So if you're a beginner, feel free to skip the sidebars on your first read, and come back to them later on once you've played around with Meteor.
### Git Commits
There's nothing worse than following along in a programming book and suddenly realizing your code has gotten out of sync with the examples and that nothing works like it should anymore.
To prevent this, we've set up [a GitHub repository for Microscope](https://github.com/DiscoverMeteor/Microscope), and we'll also provide direct links to git commits every few code changes. Here's an example of what that will look like:
<%= commit "11-2", "Display notifications in the header." %>
But note that just because we provide these commits doesn't mean you should just go from one `git checkout` to the next. You will learn much better if you take the time to manually type out your app's code!
### A Few Other Resources
If you ever want to learn more about a particular aspect of Meteor, the [official Meteor documentation](http://docs.meteor.com/) and [Meteor Guide](http://guide.meteor.com) are the best places to start.
We also recommend [Stack Overflow](http://stackoverflow.com/questions/tagged/meteor) for troubleshooting and questions, and the #meteor [IRC channel](https://webchat.freenode.net/) if you need live help.
<% note do %>
### Do I Need Git?
While being familiar with Git version control is not strictly necessary to follow along with this book, we strongly recommend it.
If you want to get up to speed, we recommend Nick Farina's [Git Is Simpler Than You Think](http://nfarina.com/post/9868516270/git-is-simpler).
If you're a Git novice, we also recommend the [GitHub](http://mac.github.com/) app (Mac OS), which lets you clone and manage repos without using the command line, or [SourceTree](http://www.sourcetreeapp.com/) (Mac OS & Windows), both of which are free.
<% end %>
### Getting in Touch
- If you'd like to get in touch with us, you can email us at [[email protected]](mailto:[email protected]).
- Additionally, if you find a typo or another mistake in the book's contents, you can let us know by [submitting a bug in this GitHub repo](https://github.com/DiscoverMeteor/book/issues).
- If you have a problem with Microscope's code, you can [submit a bug in Microscope's repository](https://github.com/DiscoverMeteor/Microscope/issues).
- Finally, for every other question you can also just leave us a comment in this app's side panel.