Commit Graph

72 Commits

Author SHA1 Message Date
David Glasser
6f05a29f0b Revert the contents of the avital-client-compatibility branch.
We will rebase linker on top of this commit, and then re-apply.
2013-05-13 11:49:45 -07:00
Avital Oliver
fb61e884db Don't create new var scope for js files in client/compatibility/ 2013-04-24 15:53:19 -07:00
Nick Martin
45dea05b21 Minor wordsmithing
(Meteor provides the package whether or not you like to use it =)
2013-04-18 20:38:16 -07:00
David Glasser
296d4f5ccf docs ready for review 2013-04-18 19:17:53 -07:00
David Glasser
f67db983c3 New check library. 2013-04-18 19:17:53 -07:00
Kevin Miller
5e107051b2 Changed JavaScript spelling to be more consistent. 2013-03-13 16:09:12 -07:00
Kevin Miller
cf2423f6ab Added authentication header to break up the rather long data & security section. 2013-03-13 16:09:12 -07:00
Kevin Miller
12fa62e33f Added link to smart packages. 2013-03-13 16:09:12 -07:00
Kevin Miller
e15c49d0de Fixed link to isClient/isServer. 2013-03-13 16:09:12 -07:00
Geoff Schmidt
017ee5eac5 minor docs editing/examples improvement 2013-03-13 06:08:52 -07:00
Nick Martin
abe3ee9cbe Merge remote-tracking branch 'origin/deps-radical' into devel 2013-03-12 10:39:03 -07:00
David Greenspan
a18a92e65f Deps.run => Deps.autorun 2013-03-11 12:17:39 -07:00
David Greenspan
8f3b0a279f final glasser review 2013-03-11 12:06:50 -07:00
Matt DeBergalis
6508299f78 docs for accounts-meetup 2013-03-10 15:14:31 -07:00
David Greenspan
69ee6af08a finish porting docs to radical deps 2013-03-08 12:06:05 -08:00
David Greenspan
e9dcb927fb start replacing words like "autorun" and "context"
What's left to do:
- "context" is now "computation"
- Autorun => Deps.run
- In Deps package, don't say "if we're inside a Deps.run" or anything else that assumes that's the only way to create a computation.  Meteor creates computations for you for templates, etc.
2013-03-08 01:42:09 -08:00
David Glasser
a08e28b6bd Fix error in docs (_id vs id). Fixes #768. 2013-03-02 18:08:16 -08:00
Mitar
82d5d0e190 Some small fixes I found while reading the documentation. 2013-03-02 18:04:10 -08:00
James Harvey
7270611889 fixed matching-brace typo in all-rooms example 2013-02-27 15:01:54 -08:00
michaelglenadams
fbb4e03f5e Update docs/client/concepts.html
Fixes typo in docs.
2013-02-20 16:48:10 -08:00
David Glasser
db535c93f3 Improved docs for two Meteor.subscribe changes.
(onError and handle.ready())
2013-02-11 20:11:05 -08:00
Nick Martin
fb3aafc794 Rework text a bit. 2013-02-01 15:22:01 -08:00
Miles Matthias
b013c573ea Adding documentation explaining Collections in the introductory Data section, fixes #149. 2013-02-01 15:07:51 -08:00
David Glasser
3a99938dff Upgrade Fibers to 1.0.0 and UglifyJS to 2.2.3.
This definitely won't "work" because both have API changes.

UglifyJS 1 was having issues minifying certain code (eg lodash).  But UglifyJS 2
was occasionally segfaulting (as was other code using large regexps).  See the
bottom of https://github.com/laverdet/node-fibers/issues/89

Hopefully this will fix it.
2013-01-16 10:47:57 -05:00
David Glasser
27d3073660 Make Meteor.autosubscribe a deprecated alias for Meteor.autorun.
Instead of a general client-side sub de-duping mechanism (which mostly existed
for the sake of autosubscribe, and causes issues with server-driven
unsubscribes), make Meteor.subscribe explicitly aware of reactivity.

Expose an "invalidated" flag on Meteor.deps.Context.

Guarantee that invalidation callbacks from different contexts will not be
interleaved at flush time. This has the implication that if you do

   context1.onInvalidate(function () {
     context2.invalidate();
   });

and this is the only way to invalidate context2, then context2's invalidation
callbacks will not be called until after *ALL* of context1's callbacks are
called. This allows us to be sure that the "unsubscribe, unless autorun tried to
re-create an identical sub" logic runs after the autorun function is rerun.
2013-01-15 17:07:03 -05:00
David Glasser
f8c54c4046 Overhaul quiescence, method callback timing, and login methods on the client.
- Data streamed from the server is quiesced on a per-object basis, not a global
  basis. We track which documents a method stubs modifies, and create individual
  snapshots ("server documents") of those documents rather than whole-Collection
  snapshots. Data writes from the server to documents not modified by stubs are
  applied immediately to the local cache; other writes are applied to the
  "server document" snapshots. Server documents are flushed to the local cache
  when all method stubs that wrote to the document have sent their "data write"
  message.  (We still do "full database" quiescence after a reconnect.)

- Instead of calling method callbacks as soon as the result is received, we wait
  until all data that precedes their "data done" message is flushed to the local
  cache. This way, method callbacks can see all of their results locally. (This
  applies to Collection mutator callbacks as well.) If this delay is
  unacceptable, you can also specify the onResultReceived option to
  Meteor.apply; this callback is given the method result as soon as it comes in,
  and there's no guarantee that the local cache is up to date.
  (This is a client-only change: server-side callbacks do not block on the
  write fence.)

- Methods invoked with the "wait" option to Meteor.apply now wait until all
  preceding methods are fully finished to be *sent*, not just to call their
  callbacks. ie, previous calls block the "wait" method in the same way that
  "wait" methods block subsequent calls.

- Remove Meteor.userLoaded and {{currentUserLoaded}}.
  Meteor.userId() is now set only at the point where Meteor.user() is fully
      loaded.
  Current user data is published via an unnamed subscription, not via
      "meteor.currentUser".
  Replace them with Meteor.loggingIn() and {{loggingIn}}, which become true
      as soon as the login method is sent (instead of only once it succeeds).
  In accounts-ui, move the spinny into the dropdown, because it now shows up
      before error messages would.

- Previously, if we received the "result" message from a method but no "data"
  message, and then disconnected and reconnected, quiescence would be
  permanently blocked. Now, not only do we allow the app to continue working,
  but we even guarantee that the method's callback will be called at the
  "reconnect quiescence" point.

- Remove reset function from the Store API (the interface between
      _LivedataConnection and Collection), and add a boolean "reset" argument to
      beginUpdate instead.
  Add saveOriginals/retrieveOriginals functions to the Store API (pass-through
      to minimongo implementation).
  Allow "replace" messages to be passed to the Store API's update function
      (in addition to set/unset).
  Allow Store API implementations (eg tinytest_client) to not specify all
      functions.

- Server-side tinytest results now stream into the result page instead of
  appearing all at once at the end.

- Rename fields and methods of Meteor._LivedataConnection as camelCase, and
  prepend all internal fields with _.

- Different Meteor._LivedataConnection objects now have separate
  _userIdListeners _ContextSets.

- Remove snapshot/restore functionality from Minimongo collections. (Individual
  queries still have result snapshots.) The "server documents" in
  Meteor._LivedataConnection serve the equivalent purpose.

- Meteor.loginWithToken's callback is now a "call with error on error, call
  with no args on success" callback like the other login callbacks.

- The test-only Meteor._LivedataConnection.onQuiesce function is removed.
  Every single use of it is now supported by normal method callbacks.
2012-11-14 18:10:08 -08:00
David Glasser
7d8f744f15 Some tweaks to dandv's doc cleanups. 2012-11-05 11:36:47 -08:00
Dan Dascalescu
5ccacd1fbd Doc cleanups. Fixes #430. 2012-11-05 11:19:23 -08:00
David Glasser
a432c243aa Update version of fibers referred to in the docs. 2012-11-02 09:12:22 -07:00
David Workman
70c5f07201 Update docs/client/concepts.html
Deployment section still specified that Node 0.6
was required for deploying on your own infrastructure,
rather than Node 0.8
2012-11-02 09:09:42 -07:00
Geoff Schmidt
7c0da2c1b4 load order docs: clarify unclear wording 2012-10-20 01:26:03 -07:00
Geoff Schmidt
d40be780fb #381, #405: Document the load order of files in an application.
Thanks @dandv, @dybskiy, @heavyk!
2012-10-20 00:31:16 -07:00
David Glasser
24ada7fecb More concepts updates. 2012-10-17 12:28:34 -07:00
David Glasser
d00f6e8bde Get rid of Concepts accounts section. Add to Data and Security instead. 2012-10-17 11:36:33 -07:00
Matt DeBergalis
b936654bcd move accounts above packages 2012-10-16 00:27:08 -07:00
David Glasser
ba732370f7 M dashes! 2012-10-16 00:04:19 -07:00
David Glasser
14375f34b7 Fix concepts ToC. 2012-10-15 23:59:50 -07:00
Matt DeBergalis
55ed0c3ba4 data section
Conflicts:
	docs/client/concepts.html
2012-10-15 23:47:57 -07:00
David Glasser
ddf870717b Link a couple of references to Node.js. 2012-10-15 11:27:01 -07:00
David Glasser
72731ddda0 Use jQuery to force all non-#internal links to use target=_blank.
Rewrite <a href> links to use Markdown syntax now that they don't need the <a
href> to get target=_blank.
2012-10-15 11:16:53 -07:00
David Glasser
a7a4e1b50c Replace old reference to auth branch with an XXX. 2012-10-15 10:57:34 -07:00
Dan Dascalescu
0a89f9408d Use better_markdown throughout 2012-10-13 21:31:55 -07:00
Dan Dascalescu
de864adddc Clarified when reactivity works
After reading the Reactivity section for the first time,
I was under the slight impression that a reactive context would
be sufficient for triggering changes. E.g. if the name in the
fragment example were set not from Session, but from a global,
it could be surmised that the HTML fragment would still be
automatically updated if the global variable changed.

This small patch tries to make it clearer that reactivity requires
*both* a reactive context and a reactive data source.
2012-10-13 19:44:19 -07:00
David Glasser
bae1a59af6 Publicize Meteor._autorun as Meteor.autorun (with docs and tests). 2012-10-12 00:50:35 -07:00
Nick Martin
3dd36e656f Add new reactive sources to the list. 2012-10-11 15:01:39 -07:00
Nick Martin
ec54838d95 Add accounts concepts section. 2012-10-11 15:01:39 -07:00
David Glasser
5e622215ba Change all publicly documented APIs to use camelCase.
For now, the old names still work as well.

This includes:
  - Meteor.isServer/isClient
  - this.isSimulation in methods
  - Context.onInvalidate
  - Meteor.status().retryCount/retryTime

Remove old backwards-compatibility "Sky" alias for "Meteor".

Update all examples in the docs to use camelCase.

Delete unused docs/client/projects.html file.
2012-09-17 14:26:45 -07:00
David Glasser
f340c35c02 Basic email support. 2012-09-14 18:38:29 -07:00
David Glasser
5697cc568b Add note to docs about auth. 2012-09-06 16:51:47 -07:00
David Greenspan
5d34cdf1d2 tmpldecl => template in URL fragments 2012-08-30 15:05:41 -07:00