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

Container / Registry Reform #11440

Merged
merged 12 commits into from
Jul 23, 2015
Merged

Container / Registry Reform #11440

merged 12 commits into from
Jul 23, 2015

Commits on Jul 23, 2015

  1. Introduce RegistryProxy mixin.

    Mix in to both `Application` and `ApplicationInstance` classes to
    provide consistent public access to their internally maintained
    registries.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    ca61792 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    be5b067 View commit details
    Browse the repository at this point in the history
  3. Simplify ApplicationInstance creation.

    Pass the related Application, which the instance can inspect to obtain
    the initialization data that it needs.
    
    This eliminates the need to set `applicationRegistry` on the instance,
    which was always an anti-pattern.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    b06bd88 View commit details
    Browse the repository at this point in the history
  4. Privatize registry access with dunderscores.

    The `RegistryProxy` mixin now maintains the registry instance as
    `__registry__`.
    
    As appropriate, the equivalent `RegistryProxy` methods are called
    instead of directly accessing the `registry`.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    b1cec55 View commit details
    Browse the repository at this point in the history
  5. Initializers now just take a single argument: App.

    Registry access must go through the Application now.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    a27dc7a View commit details
    Browse the repository at this point in the history
  6. Rename Container#_registry to Container#registry.

    Now that container will be fully privatized, we can relax naming of
    members like `registry` that won't be accessed outside of the
    framework.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    c125649 View commit details
    Browse the repository at this point in the history
  7. Introduce ContainerProxy mixin.

    Mix in to `ApplicationInstance` class to provide public access to
    a few select methods on the encapsulated container.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    93a95c6 View commit details
    Browse the repository at this point in the history
  8. Do not set the resolver on the application instance's registry.

    Instead, allow the application's resolver to be invoked only as part of
    the fallback strategy for the application instance's registry.
    
    This has a couple benefits:
    
    * It allows registrations made in the app instance's registry to be
      resolved before falling back to the app's registry, rather than
      hitting the resolver beforehand. This is important for scenarios such
      as testing in which custom registrations need to take precedence
      over the resolver.
    
    * It is also more efficient in the case when the app's registry's
      registrations are used to resolve, because it avoids calling the same
      resolver twice before finally getting the registration.
    
    [Closes emberjs#11174]
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    e3ad9e2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e64c9ba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f982e89 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    253edc4 View commit details
    Browse the repository at this point in the history
  12. Introduce ember-registry-container-reform feature flag.

    * Ensure that `Container#_registry` remains supported for now.
      Can be deleted once cont/reg reform is enabled by default.
    
    * Continue to expose `registry` and `container` on `ApplicationInstance`.
      These can be removed once cont/reg reform is enabled, but we’ll still
      need to expose `ApplicationInstance.container.lookup` until 3.0.
    
    * Flag deprecation of Application initializer `initialize` arguments.
    dgeb committed Jul 23, 2015
    Configuration menu
    Copy the full SHA
    c353c38 View commit details
    Browse the repository at this point in the history