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 Refactor #288

Merged
merged 10 commits into from
May 1, 2017
Merged

Container Refactor #288

merged 10 commits into from
May 1, 2017

Conversation

davewasmer
Copy link
Collaborator

The resolver and related refactor enables:

  1. Lazy loading of app code, which is now the default. It doesn't preclude eager loading though, and future work could add an eager load option for production environments. This matches our long term goal - lazy load for faster dev and test environments, and eager load for production for smoother, more predictable performance.

  2. Customizable directory structures. This is generally not a good idea for the casual use case, but it's possible that some additional type of code asset might need different lookup rules (i.e. test files)

  3. Cleaner addon / application loading. The application logger is now customizable by simply adding app/logger.js (as long as the interface matches). Same for the app/router.js.

This also solves some outstanding issues: fixes #285, #284

@davewasmer davewasmer changed the title [WIP] Container Refactor Container Refactor Mar 25, 2017
@davewasmer
Copy link
Collaborator Author

This should be backwards compatible. Also note that I've left out injections for now - that may end up requiring a bigger, backwards-incompatible change. This lays the foundation for injections, but doesn't require/support them yet.

The resolver and related refactor enables:

1. Lazy loading of app code, which is now the default. It doesn't
preclude eager loading though, and future work could add an eager load
option for production environments.

2. Customizable directory structures. This is generally not a good idea
for the casual use case, but it's possible that some additional type of
code asset might need different lookup rules (i.e. test files)

3. Cleaner addon / application loading. The application logger is now
customizable by simply adding `app/logger.js` (as long as the interface
matches). Same for the `app/router.js`.

This also solves some outstanding issues: fixes #285, #284
… lookup app modules (router, logger) until after addons are constructed so that we can rely on addons to supply those
@davewasmer davewasmer merged commit a4894d7 into master May 1, 2017
@davewasmer davewasmer deleted the container-refactor branch May 6, 2017 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure containers get a unique copy of loaded classes
1 participant