Questions tagged [meteor]

Meteor is a modular platform for developing web and mobile applications in JavaScript based on the NodeJS platform.

Meteor is a modular platform for developing web and mobile applications in pure JavaScript (though other languages can be used as well). Meteor is built on one unifying idea: Servers should serve data, not HTML, to clients, and should push updates to clients whenever data changes. It should then be up to the client to decide how to render the data.

Meteor consists of multiple parts:

  • A framework of JavaScript modules, that aid developers in architectural decisions, building the communication layer between client and server or writing isomorphic code.

  • A set of packages from which the developer may pick and choose. A set of core packages are available that handle common tasks, such as watching a database for changes, or rerendering a HTML template as data changes. Furthermore, there are NPM packages available for integration on any target architecture (server, client, mobile).

  • A build tool (which includes the meteor cli), that picks up the project's code, Meteor packages, NPM packages and (optional) isobuild feature-packages to create a build output for multiple target architectures (server, client, mobile). For production the output is packed into a tarball that's ready to deploy. The tarball can be unpacked and run anywhere there's .

  • An integration for many popular frontend libraries, such as , , or for Templating systems such as (based on Handlebars and released with Meteor 0.8), databases such as and languages such as , .


Core Meteor technologies :

  • Hot Code Push. When an application is redeployed, Meteor can transparently inject the update into each browser tab that has the application open, without losing the user's place in the application.

  • DDP. A simple protocol for publishing a set of JSON records (say, the current stories in user X's news feed, together with all comments on those stories), and then keeping that set up to date with create, update, and delete messages. DDP can run over Websockets or AJAX long polling, and supports transparent reconnection. Anything that speaks DDP can connect to a Meteor server (not just Meteor clients); Meteor clients can connect to any DDP server (not just their own Meteor server.)

  • Live page update engine. This is a layer that fits underneath any templating system (such as Handlebars or Jade) to make the rendered template automatically update in-place, no matter where it is inserted in the DOM. This is done by rendering a template in a context where its data accesses are recorded, then wiring up callbacks to track the location of the rendered DOM nodes and re-render the template if the data changes.

  • Latency compensation. When a user makes a change, their own screen can update immediately without waiting for the server. This is done by (optionally) executing the model update code on both the client and the server. Once the server has responded to the request, then if it executed differently there, the client state is patched up to match the server.

  • Smart Packages. Meteor packages are actually small JavaScript programs that are loaded at deploy time. By setting up callbacks using the bundler API, they can inject code into the client or the server, register new file extensions, precompile templates, preprocess source code, etc, allowing the package author to deliver a smoothly integrated experience. As of Meteor 1.3, npm became fully supported as well.


Official resources:


Additional Resources:

Other Resources:

Please use these with care. Some of the resources may be outdated or may target an outdated Meteor version (< 2.0).

Related

Older releases:

29096 questions
248
votes
1 answer

What are the key differences between Meteor, Ember.js and Backbone.js?

Learning Ember.js / Backbone.js has been on my to-do list for a while. Now that Meteor is out, I am just wondering if anyone with experience of Meteor, Ember.js and Backbone.js can summarize the key differences and pros and cons of these three…
K Z
  • 29,661
  • 8
  • 73
  • 78
202
votes
4 answers

How to properly make mock throw an error in Jest?

I'm testing my GraphQL api using Jest. I'm using a separate test suit for each query/mutation I have 2 tests (each one in a separate test suit) where I mock one function (namely, Meteor's callMethod) that is used in mutations. it('should throw…
Le garcon
  • 7,197
  • 9
  • 31
  • 46
165
votes
14 answers

What are the best practices for structuring a large Meteor app with many HTML template files?

In all the examples (leaderboard, wordplay, etc.) they have one single HTML template file. Is there some large open source Meteor project with many different HTML template files we can use as a best practice example? Doesn't seem practical to put…
Andrew Arrow
  • 4,248
  • 9
  • 53
  • 80
155
votes
15 answers

What should I put in a meteor .gitignore file?

I have a new meteor project. I'm guessing the .meteor dir has a combination of configuration files (needed) and temporary files (not needed). So what's in your .gitignore?
Michael Forrest
  • 3,461
  • 4
  • 22
  • 35
152
votes
17 answers

Facebook login message: "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings."

Important notice: If you register for testing, go to your profile settings and to your interests add delete profile. Trying to login with Facebook to my website: I get the following error: URL Blocked: This redirect failed because the redirect URI…
Amir Rahbaran
  • 2,380
  • 2
  • 21
  • 28
135
votes
3 answers

When should you use render and shallow in Enzyme / React tests?

prior to posting this question, I tried to search in sqa stackexchange but I found no post about shallow and render there, so I hope someone can help me out here. When should I use shallow and render in testing react components? Based on the airbnb…
Cyval
  • 2,429
  • 4
  • 16
  • 27
120
votes
13 answers

Meteor test driven development

I don't see how to do test driven development in meteor. I don't see it mentioned anywhere in documentation or FAQ. I don't see any examples or anything like that. I see that some packages are using Tinytest. I would need response from developers,…
Rubycut
  • 1,646
  • 2
  • 16
  • 24
113
votes
4 answers

npm install the exact package version specified in package.json

Currently, If I run npm install, it installs the updated version of already installed packages. How can I install the exact version as specified in the package.json file?
suheb
  • 1,509
  • 2
  • 13
  • 19
108
votes
3 answers

How does the Meteor JavaScript framework work?

I came across Meteor and while it seems exciting, I want to know how it works. I mean conventional web applications work like this: You have scripts on server which take data from database and add that dynamically to web-pages and the user-submitted…
Jatin
  • 14,112
  • 16
  • 49
  • 78
105
votes
13 answers

Generating a PDF file from React Components

I have been building a polling application. People are able to create their polls and get data regarding the question(s) they ask. I would like to add the functionality to let the users download the results in the form of a PDF. For example I have…
Ozan
  • 1,623
  • 3
  • 13
  • 25
100
votes
4 answers

How efficient can Meteor be while sharing a huge collection among many clients?

Imagine the following case: 1,000 clients are connected to a Meteor page displaying the content of the "Somestuff" collection. "Somestuff" is a collection holding 1,000 items. Someone inserts a new item into the "Somestuff" collection What will…
Flavien Volken
  • 19,196
  • 12
  • 100
  • 133
98
votes
3 answers

Console logging for React

I'm super new to React and I'm trying to get it set up for Meteor and piecing stuff together from other sources too. One of these other sources set up console logging for the app, but I'm going the ES6/JSX way, so just using their code wouldn't work…
adinutzyc21
  • 1,538
  • 1
  • 11
  • 23
92
votes
4 answers

What security mechanisms does Meteor have?

We all know that Meteor offers the miniMongo driver which seamlessly allows the client to access the persistent layer (MongoDB). If any client can access the persistent API how does one secure his application? What are the security mechanisms that…
Olivier Refalo
  • 50,287
  • 22
  • 91
  • 122
88
votes
3 answers

node.js vs. meteor.js what's the difference?

So I've been hearing/reading alot about meteor.js. The tutorials make it seem very sporty as a framework, but I'm still a bit of a novice when it comes to web programming. I've been trying over the last month and half to really learn node.js and…
ZacAttack
  • 2,005
  • 5
  • 21
  • 34
85
votes
8 answers

How do I use an existing MongoDB in a Meteor project?

Let's say there is a running MongoDB server for a GUI client (by wxPython) for a while. How could I connect my new Meteor project to my already existing MongoDB?
Drake Guan
  • 14,514
  • 15
  • 67
  • 94
1
2 3
99 100