Achieving a modular architecture
Path's declarative model also makes it very easy to load modules and dependencies via HTML. Some of the key goals of its module loading system are as follows:
- Bundling: When it is known that a group of modules is needed, bundle them into one package and send them in one request.
- Caching: Once a module has been retrieved from the server, it should not need to be requested again. Path maintains a cache of module data on the client.
- Communication: Path routes events through paths such as
/click/get/email
. Modules do the same, broadcasting their data alongmodule/moduleName/eventName
paths, allowing listeners to act on those transmissions. - Encapsulation: No direct access to a module's internals is allowed. All communication is via paths, as described previously.
- Templates and data binding: Each module is easily bound to a data source, served through a real time socket server. When new data arrives, the module will automatically update its view.
Path was...