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

Granular loading of modules #49

Closed
brunschgi opened this issue Mar 23, 2015 · 1 comment
Closed

Granular loading of modules #49

brunschgi opened this issue Mar 23, 2015 · 1 comment
Assignees
Milestone

Comments

@brunschgi
Copy link
Owner

By now TerrificJS does only take care of instantiating the correct modules and skins. It does not provide a mechanism to lazy load modules on a granular level. Most of the time its assumed, that all module classes exists on page load.

With the more descriptive approach described in #40 TerrificJS is able to introduce granular loading out-of-the-box. Its even possible to only lazy load modules that do not exist on page load.

The mechanism will work as follows:

  1. Check whether Tc.Module.Xyz is existent during the bootstrap
    2a. If yes -> do nothing
    2b. If no -> lazy load Tc.Module.Xzy
  2. Bootstrap modules as normal
@brunschgi brunschgi self-assigned this Mar 23, 2015
@brunschgi brunschgi added this to the 3.0.0 milestone Mar 23, 2015
@brunschgi
Copy link
Owner Author

As lazy loading is not used in every project, we do not want to blow up the code and lose TerrificJS micro focus due to this feature. Moreover the lazy loading part can be solved in many different ways – e.g. by using the AMD pattern or by simple script injection – and we do not want to introduce an opinionated way to solve this issue.

Nonetheless with the introduction of lifecycle events #53 it should be easy to implement a lazy loading mechanism for your project.

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