Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and modularize app/router initialization #10256

Merged
merged 11 commits into from
Jan 22, 2015
Merged

Simplify and modularize app/router initialization #10256

merged 11 commits into from
Jan 22, 2015

Commits on Jan 21, 2015

  1. Actually set test location to ‘none’

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 21, 2015
    Configuration menu
    Copy the full SHA
    585a935 View commit details
    Browse the repository at this point in the history
  2. Default resolver matches CLI resolver main

    The CLI resolver always treats type keys with the name of `main` as
    top-level objects. For example, `router:main` resolves to `app/router.js`
    instead of `app/routers/main.js`.
    
    This change updates the default resolver to always look for
    `foo-bar:main` as `App.FooBar`. This is in anticipation of application
    init/boot cleanup that we are doing as part of the FastBoot effort.
    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 21, 2015
    Configuration menu
    Copy the full SHA
    0320b5a View commit details
    Browse the repository at this point in the history
  3. Simplify and modularize app/router initialization

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 21, 2015
    Configuration menu
    Copy the full SHA
    788580f View commit details
    Browse the repository at this point in the history
  4. Store an ApplicationInstance on the Application

    Instead of storing a `__container__` on the Application, this commit
    stores an ApplicationInstance, which manages the per-instance lifecycle.
    
    The next step will be allowing multiple `ApplicationInstance`s to exist
    at once, enabling a single app to serve multiple FastBoot requests at a
    time.
    
    This is a conceptual improvement that brings application “reset” in line
    with the destruction infrastructure.
    
    As part of this commit, we eliminated an ad-hoc call to router.reset(),
    allowing that logic to happen as a natural consequence of destruction
    of the `ApplicationInstance`.
    
    In general, the goal of this commit is to move all responsibility for
    application state into an object that manages it.
    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 21, 2015
    Configuration menu
    Copy the full SHA
    0941344 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9c2b8d4 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2015

  1. ApplicationInstance should create container

    Based on feedback from @stefanpenner, we moved responsibility for
    creating the default container from the `Application` to the
    `ApplicationInstance`. Instead, the instance points back at the
    application’s registry, using it as the basis for a new container.
    
    This commit also adds initial documentation to the application instance.
    tomdale committed Jan 22, 2015
    2 Configuration menu
    Copy the full SHA
    434e9cc View commit details
    Browse the repository at this point in the history
  2. Introduce instance initializers

    This commit introduces a new (feature flagged) API for adding
    instance initializers.
    
    Instance initializers differ from normal initializers in that they are
    passed the app instance rather than a registry, and therefore can access
    instances from the container in a safe way.
    
    This design not only allows us to avoid expensive app setup for each
    FastBoot request, it also minimizes the amount of work required
    between acceptance test runs (once the testing infrastructure
    is updated to take advantage of it).
    
    This commit also removes a previously introduced deprecation that was
    not behind a feature flag. That deprecation (when emitted with the
    feature flag enabled) now points to a comprehensive deprecation guide.
    tomdale committed Jan 22, 2015
    Configuration menu
    Copy the full SHA
    cf55da2 View commit details
    Browse the repository at this point in the history
  3. Call super from router willDestroy

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 22, 2015
    Configuration menu
    Copy the full SHA
    73d3ee0 View commit details
    Browse the repository at this point in the history
  4. Add tests for arrays of before and after

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 22, 2015
    Configuration menu
    Copy the full SHA
    496dfe7 View commit details
    Browse the repository at this point in the history
  5. Add documentation to ApplicationInstance props

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 22, 2015
    Configuration menu
    Copy the full SHA
    a16adec View commit details
    Browse the repository at this point in the history
  6. Pass arguments to _super

    Tom Dale and Yehuda Katz authored and tilde-engineering committed Jan 22, 2015
    Configuration menu
    Copy the full SHA
    e929b74 View commit details
    Browse the repository at this point in the history