guardian/frontend — pull request #2408 by janua (2013-11-27 16:28:14+00:00)
Title: Collection map

After I started the notification (fast flowing) work, we exposed that fact that our JSON format was not going to work.

There were a few problems floating around, that I have explained in [Skeleton Pull Request #19](https://github.com/guardian/skeleton/pull/19).

Essentially what this does is that it begins to use the new `config.json` format that we are planning to use on the front. This config file is now one big file for all the fronts.

This allowed us to do a few things (Basically these are the changes):

- One agent for all collections. This `Agent` wraps a `Map[String, Collection]`, where the `String` is the `id` of the `Collection`. This was the main motivation for moving. With all `Collection`s in one place, it makes it easy to update one collection, or query one collection. Before this it was difficult to do so as one `Collection` could have a different tail depending on what was in the `config.json` `contentApiQuery`.
- One agent solely for the `config.json` file: `ConfigAgent`. This `Agent` wraps the parsed JSON in memory ready for you to query.
- Remove various things that made things; `Query`, `PageFront`, `pageFrontAgent`.
- Completely simplifies the `Front` class.

The main disadvantage of this PR is that the instant startup of facia (for main fronts) is gone. This is because `ConfigAgent` and `CollectionCache` are now independent and do not wait on each other.