171
edits
m (updated to reflect the evolution of the securable modules proposal.) |
|||
Line 1: | Line 1: | ||
== Modules == | == Modules == | ||
To date, client side JavaScript has generally been able to get away with something as simple as the <script> tag and no standard way to do namespaces. On the server, it's a bit different because you're more likely to use more libraries and you can potentially load up a lot of code. Having a basic system for loading code and encouraging the use of namespaces to avoid unintentional interference will underlie everything else. | To date, client side JavaScript has generally been able to get away with something as simple as the <script> tag and no standard way to do namespaces. On the server, it's a bit different because you're more likely to use more libraries and you can potentially load up a lot of code. Having a basic system for loading code and encouraging the use of namespaces to avoid unintentional interference will underlie everything else. | ||
=== Proposals === | |||
Several proposals have been made. There has been convergence toward the [[ServerJS/Modules/SecurableModules|Securable Modules]] proposal, with several implementations passing the unit tests. | |||
# [[ServerJS/Modules/GlobalFileLoading|Global File Loading]] | |||
# [[ServerJS/Modules/GlobalObjectLoading|Global Object Loading]] | |||
# [[ServerJS/Modules/PythonicModules|Pythonic Modules]] | |||
# [[ServerJS/Modules/SecurableModules|Securable Modules]] | |||
=== Prior Art === | === Prior Art === | ||
Line 18: | Line 26: | ||
* [http://torino.sourceforge.net Torino] implements a C-style "#include" preprocessor which is intended to provide a low-level loading mechanism on top of which more sophisticated module management schemes can be implemented in JavaScript. | * [http://torino.sourceforge.net Torino] implements a C-style "#include" preprocessor which is intended to provide a low-level loading mechanism on top of which more sophisticated module management schemes can be implemented in JavaScript. | ||
* [http://wiki.eclipse.org/E4 Eclipse E4] is doing work using Rhino to support writing modular [http://wiki.eclipse.org/E4/JavaScript JavaScript bundles] that can interoperate cleanly with the OSGi modularity layer used by Java plugins in the platform. | * [http://wiki.eclipse.org/E4 Eclipse E4] is doing work using Rhino to support writing modular [http://wiki.eclipse.org/E4/JavaScript JavaScript bundles] that can interoperate cleanly with the OSGi modularity layer used by Java plugins in the platform. | ||
=== Related Discussions === | === Related Discussions === |
edits