-
Notifications
You must be signed in to change notification settings - Fork 62
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
Evaluate AMD replacement of F2's internal loader #129
Comments
Please look at e2dfa28#commitcomment-4013708 as a safer approach than an in-place rewrite of the F2 loader engine. |
Few questions for discussion:
|
From @montlebalm 's comment in #125 (comment)
I'd like to add and clarify:
|
@brianbaker I'll take a shot, but the answer depends on which strategy below is chosen First, I think three strategies are possible:
Option 1 is the cheapest and most backwards compatible. The AMD engine can load both Option 2 requires Containers, Apps, and F2 itself to make big changes, but it also has the biggest benefits. Option 3 is a blend of the options 1 and 2. It makes switching to AMD optional for users and has roughly the same development cost as Option 2, but the long term maintenance costs to F2 are quite high (consider that most estimate maintenance costs to be 3-4x development costs). |
My thoughts on @brianbaker's discussion questions
If done via Option 1, probably nothing would be required of Containers. It may or may not be necessary to label an appManifest or appConfig as being AMD-friendly. If done via Option 2, then the Container itself should be an AMD module, though it is possible to call AMD code from non-AMD code, but you'll need to combine that with Promises.
The point of the AMD specification is to allow different AMD implementation to be interchangeable, so I would vote for unbundling.
Depends on which option is chosen, see #129 (comment)
That depends on how much you care about JS minification -- you only need separate builds if there is a significant difference in the size of the library. Without AMD, there have to be separate grunt tasks for each configuration. With AMD correctly structured, r.js will build only the modules you actually use, without any work/decisions from the user. |
FYI, jQuery just finally switched their internals over to AMD |
Just to keep a heartbeat going and to inform watchers, we have been meeting internally to get a more formal proposal—which we'll post here—drafted on updating F2's internals to use AMD. We're striving to keep the current API the same as it is today but it's looking like we'll have some minor changes. More soon, stay tuned. |
If the API changes become major enough to also change the manifest, do please consider revising to extend package.json instead of extending the current F2 manifest format. |
Based on the discussion in #125 let's use this Issue as a place to discuss requirements for replacing F2's internal loader with an AMD solution (such as requirejs). The discussion should also cover dependency management at a high level. (I realize there is overlap between AMD and "dependency management".)
Note: the internal loader was recently upgraded, see #120.
The floor is open...
The text was updated successfully, but these errors were encountered: