Skip to content

Aliasing Strawman

Dominic Chambers edited this page Oct 29, 2013 · 3 revisions

Questions To Be Answered

  • Will aliases be allowed to point to require paths?
  • Could require paths be searched for inside non Javascript files?
  • Are require paths obfuscation proof?
  • What purpose do aliases now serve in light of these changes?
  • How can we best utilize Java 7 file-watching to reduce the need to re-parse files each time we bundle?

Strawman Proposal

BladeRunnerJS

  • Require paths are obfuscation proof (they are strings that don't get garbled) so aliases are now only needed as a pure IoC mechanism and to allow discoverability.
  • An alias therefore is a logical name that can be used in place of a require path, where the actual require path used can be swapped in as necessary.
  • Classes will use explicit includes (to either a require path or an alias), and will not therefore need to be processed with a trie.
  • XML configuration and HTML templates may contain indirect class references (via either require paths or aliases) and must therefore be processed with a trie.

CaplinTrader Legacy

  • Aliases can still continue to point to class names for backwards compatibility reasons.
  • XML configuration and HTML templates can continue to point to class names for backwards compatibility reasons.
  • If any old style classes are referred to, or there are any old-style class references detected within HTML or XML, then all new style classes will globalized so they are again accessible using class references.
Clone this wiki locally