Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

effective context pre-processing #1

Open
marc-portier opened this issue Sep 29, 2011 · 0 comments
Open

effective context pre-processing #1

marc-portier opened this issue Sep 29, 2011 · 0 comments
Assignees

Comments

@marc-portier
Copy link
Owner

Over time the various iterations of the specification (specially since the 0.4) has been pushing out some of the originally (0.4 draft) ambitions out of the spec into what I would call "context-pre-processing".

We could argue that this makes the URI-templates less usefull, but on the positive side the spec becomes more readable, and less open to intrepretation and discussion. The good news is that outside the spec we could ensure end user effectiveness still by providing smart and helpfull context-pre-processing features.

Things coming to mind:

  • Introducing defaults for various fields
  • Expanding lists to maps of indexed-names: so list: ['a','b','c'] becomes list: {'list.1': 'a', 'list.2': 'b', 'list.3': 'c'}
  • Similar expansion for the hash-tables so the original name gets associated.
  • producing json serilaized forms for deeper structures (with some way to negotiate between these two)

Maybe some builder-syntax can be used to express the final context from the original one:

var finalContext = ContextBuilder(originalContext).defaultsTo({...}).expand('list',...).jsonify('deepstruct',...).get();

We already have some built-in context-wrapper for function evaluation, maybe this concept can be extended to offer these new features.

See also my expressed opinion on w3c-uri-mailinglist

@ghost ghost assigned marc-portier Sep 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant