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

Use glimmer-di or similar for Container #284

Closed
davewasmer opened this issue Mar 15, 2017 · 2 comments
Closed

Use glimmer-di or similar for Container #284

davewasmer opened this issue Mar 15, 2017 · 2 comments

Comments

@davewasmer
Copy link
Collaborator

Right now, the Container class poorly encapsulates it's responsibilities.

glimmer-di provides a nice set of abstractions for various responsibilities - a Resolver responsible for mapping lookups to filesystem (right now handled by the Application class in Denali), a Registry for manual registrations (handled by Denali's Container class), a Container for instantiation, etc.

@davewasmer
Copy link
Collaborator Author

So using glimmer-di is blocked on their support for a lookupAll() (see the proposal I filed, glimmerjs/glimmer-di#32).

Unless a good use case can be made for Glimmer / Ember to use lookupAll(), I doubt it will be added. @acorncom made the point that such eager loading might be useful for Fastboot to "pre-warm" the container's cache.

We should investigate whether this is feasible, and if so, make the case in the issue linked above. We could then fork glimmer-di for now, adding lookupAll() (and PR'ing upstream). If glimmer-di merges it, we can drop our fork and use the upstream. If they decline, their API is likely a decent starting point for our own implementation anyway.

@davewasmer davewasmer modified the milestone: v0.1.0-beta.1 Mar 16, 2017
davewasmer added a commit that referenced this issue Mar 20, 2017
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
This was referenced Mar 20, 2017
davewasmer added a commit that referenced this issue Mar 21, 2017
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
davewasmer added a commit that referenced this issue Mar 25, 2017
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
davewasmer added a commit that referenced this issue Mar 25, 2017
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
davewasmer added a commit that referenced this issue May 1, 2017
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
davewasmer added a commit that referenced this issue May 1, 2017
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
@davewasmer
Copy link
Collaborator Author

Fixed in #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant