Hi Chris,
To generate some discussion, my idea is to have the a Grunt 'debug' switch or command to run a task which adds a two-pronged validation in addition to JSON lint:
- Full Adapt JSON validation (from article to component, and all in between)
- Validation of access to all resources (images, video, etc.)
By "full JSON validation" let me clarify that I mean that each component (for example) has its own schema, detailing which attributes are required and which ones are optional,and what their potential values might be. Following successful JSON-lint, at the point where the JSON files are read into Backbone, each component JSON should be validated against its own schema, and any errors flagged to the user, possibly in the front end and definitely in the browser console. There is currently on-going work to define the schemas themselves for the UI project, but the work here could align nicely. At the point the actual validation could be handled by a simple Grunt task.
Regarding access to resources, this would involve getting all the external content that components reference, e.g. images, sounds, videos, and making a request to check that they're accessible. A simple check for anything other than a HTTP 200 code here would be an improvement on what is currently there.
I think both these measures would provide great feedback, and not just for developers, but content creators who might not be familiar with the browser's debugging tools. Just thinking about it we could also have the Adapt output (when in debug mode) link back to the Wiki or some help system.
Regards,
Brian