PageGateway.js does too much:
- File scope response caching.
- JSON MW API response marshaling.
- HTML server side render marshaling.
- HTTP client for multiple endpoints: siteinfo, mobileview.
- HTML section rendering.
This task is about splitting it up into a few new files including:
- Caching moves somewhere else or is deleted. Make sure you understand the consequences to callers.
- siteinfo client moves to new gateway.
- HTML renderer moves to a new file.
- Server side HTML to Page marshaling moves to a new file.
Work out how it is being used by Talk and Edit features and determine if any of it can be thrown away.
- Why is caching needed?
- Why is site info needed?