Wikia/app — pull request #1243 by nandy-andy (2013-08-02 14:34:26+00:00)
Title: DAr-1242 Refactor UIFactory and UIComponent

Addressed given feedback:
* use `DIR_SEPARATOR`,
* separate `UIFactory` from styleguide - components loading,
* move Styleguide class to styleguide extension,
* `loadComponentConfig` - use `WikiaDataAccess`,
* improve method's names (make it clear what they do),
* `init` -- cache variables for JS and CSS assets dependencies,
* use `\Wikia\UI` namespace.

Feedback which was discussed but no changes were made:
* hardcoded path to components repo directory,
* move part of logic from `UIComponent` to `UIFactory` (setup, paths etc.)

The first point wasn't what we thought it was about hard-coded path to components' directory but more about the logic connected with template engine and generating paths to component's templates (which was connected to second point). We decided that it's not a complicated logic and the requirement for **Styleguide is to use ONLY** mustache, so we can stay with it as it is. Also, the generating template's path is a part of Component's render method and we shouldn't generate it while initialization of a component.