Skip to content

Documentation notes

Rand McKinney edited this page Apr 30, 2014 · 5 revisions

Current "Overview" section

The StrongLoop Zone library addresses several issues in Node application development:

  • Stack traces are useless when an asynchronous function fails.

  • Asynchronous functions are hard to compose into more high-level APIs. Imagine a simple asynchronous API like bar(arg1, arg2, cb) where cb is the error-first callback function specified by the user. To use this correctly you must:

    • Call the callback function exactly once (not more).
    • Not throw an exception synchronously and also call the callback function.
    • Not call the callback function synchronously.
  • It is difficult to handle errors raised asynchronously. Typically Node will crash. If the user ignores the error, the application may leak resources. Zones make it easy to handle errors and avoid resource leaks.

  • Sometimes you need to associate user data to an asynchronous flow. There is currently no way to do this.

Proposed revision

Need to add brief "how" explanation to each item below.

The StrongLoop zone library:

  • Enables more effective debugging by providing better stack traces for asynchronous functions.
  • Makes it easier to compose high-level APIs with asynchronous functions.
  • Makes it easier to handle errors raised asynchronously and avoid resulting resource leaks.
  • Enables you to associate user data with asynchronous control flow

Clone this wiki locally