Locater is a filesystem abstraction that is meant to provide access to configurations and resources that describes a YUI App.
The responsibilities of the Locater are:
- To explore and flatten the structure of a YUI App.
- To watch and cache meta information to speed up the warm up process for the app.
- To provide meta information about logical pieces in the application (aka mojits).
- To provide meta information about specific resorces.
- To provide access to configuration files (ycb files) through the contextualizer.
- To support config, plugins and other forms of extensions to expand the capabilities of the Locater. (I'm not so sure about this just yet)
YUI Apps are meant to run in many different runtimes, each of those runtimes can use a different way to load resources and configuration. Locater can facilitate that process by abstracting the access to any phisical structure and contextualized meta information.
The flattening process is just a build process that is very flexible and includes NPM dependencies and other forms of depencies to support software aggregation. This process will also resolve conflicts and facilitate software inteligence by understanding of the capabilities of a particular application, and building metadata and optimized production code.
YUI Apps can be very complex, specially if it is meant to work for many locales with custom configurations and languages. The build process for an application with 50 logical pieces and 40 languages might take a while. For that, the Locater should be smart enough to facilitate development by watching for changes and updating the internal cache.
The cache should be use to boot the application faster through a warmup process. As a result, there is not need to walk the app folder structure or even execute complex syncronous processes to understand the capabilities of the logical pieces or specific settings during the restart of the application, because all that information is already cached.
In production, we can make that cache permenent (as part of the package) and the warmup process will take care of the rest while the watch is not needed.
YUI provides the abtraction layer (runtime) and the building blocks to create complex apps, but it does not provide any abstraction for business logic. Even though the Widget foundation can take care of basic UI logic, that's not enough. For that, we have the mojit concept. Locater is fully capable to understand those logical pieces, and provide comprenhasive API to get contextualized versions of the logical pieces in a YUI App, including access to configurations, resources, etc.
TBD