-
Notifications
You must be signed in to change notification settings - Fork 35
Update to TemplateRenderMethod and consider re-evaluating the use of in-lined render templates #421
Description
Now that TemplateRenderMethod has been released and supersedes the render methods we've used up until this point, we should update to both use and recommend that (it's much more general and has had more eyes looking at it).
The TemplateRenderMethod still allows in-line templates, but also provides good support for linking to external templates with integrity checks (using digestMultibase) (see the related #408).
I dived into the current rendering support because I'm trying to understand why we are recommending in-lined templates. I've tried to find the history for the decision to in-line a template (and potentially logos / images) within the credential itself. The trail is as follows:
- Investigate best ways to render a credential template (inlined?) #25 , but other than the title, that issue doesn't make a case for in-lining the template, but rather talks about standards to be used. In fact, the first comment (from Steve) seems to indicate that a non-inlined solution (using a hash digest or similar) is preferred.
- Out of the above, we created the WebRenderingTemplate2022 proposal at https://github.com/w3c-ccg/vc-render-method/issues/7 . In that proposal it looks like we're already assuming in-lined templates (with pros and cons mentioned there). The example template on that ticket is 17kb on its own, which is around the same size as our DPP instance example for 0.6.0 (without a template).
- That proposal is closed in favor of the more generic RenderTemplate2024 in https://github.com/w3c-ccg/vc-render-method/issues/9 (it allows different formats and methods) which was closed just 3 weeks ago with a PR resulting in
- The published TemplateRenderMethod that we now see at https://w3c-ccg.github.io/vc-render-method/ .
Other than our WebRenderingTemplate2022, none of the above assumes or prefers inlined templates, while still allowing people to use inlined templates if they want to.
I personally think we should do the same: when we update to TemplateRenderMethod, let's demonstrate links to external templates with integrity via the digestMultibase field by default, while also demonstrating how you can use an inline template to develop your template initially (but talk about the cons of inlining your template in all the credentials you issue). Looking at the advantages (of in-lined templates, I think that's implied) on https://github.com/w3c-ccg/vc-render-method/issues/7 , I think (personally) the only one which is an advantage is the ease of creation.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status