-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into development
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Design Decisions: App context | ||
|
||
App context is a combination of metadata about the current application and the page it is serving for use by client-side code. This is a change from the existing FT.com toolset. | ||
|
||
Previously metadata was embedded into the HTML as data attributes on the document element (`<html>`). This implementation had several problems: | ||
|
||
- What the metadata properties were and how they should be used was not defined anywhere. | ||
- The mechanism was often misused to pass additional information from server to client which lead to de facto standards emerging across different parts of FT.com. | ||
- We did not know who or what relies on this data meaning we were scared to change it, or fix it. | ||
- Several properties had changed in scope, either the name became irrelevant or the type of data had changed. | ||
|
||
To help resolve this our implementation of app context is based upon a schema which documents and guarantees the data. The schema also defines how the feature can be used to reduce the chances of it being re-purposed or misused. The schema also enables us provide an official reference for people to follow because we don't always know who or what may be using the data. | ||
|
||
Finally, the app context feature has enabled us to refactor the [ads] and [tracking] components. They now provide their own, separate options, and are deterministic rather than each arbitrarily scraping pages for information. | ||
|
||
[ads]: https://github.com/Financial-Times/n-ads/ | ||
[tracking]: https://github.com/Financial-Times/n-tracking/ | ||
|
||
## Decision owners | ||
|
||
- Matt Hinchliffe | ||
- Ifeanyi Isitor |