-
Notifications
You must be signed in to change notification settings - Fork 16
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
add optional "title" element to collection object #8
Comments
I'm not a big fan of introducing UI related properties on CJ. I think |
i understand your POV. i think there are many ways to use Cj and i'd like to make sure it is not difficult for some folks. i know as i work out several examples of generic clients, this is a major helper value. keep in mind this is optional too, not even a SHOULD, just a MAY. would you feel different if we said that |
My concern is: if a I'm just thinking loud, and I don't really have a strong opinion on this, but what if instead of a |
i understand your concern. just because it is possible that we could add too many i will also say that i am not a fan of adding a new aggregation block (object or array) at the finally, apart from the fear of an explosion of properties at the |
What about a // Someone might want regular names
"contents": {
"data": [
{"name" : "title", "value" : "Posts", "prompt": ""},
{"name": "body", "value": "All Posts written by our staff. Blah blah blah", "prompt": ""}
]
}
// Someone might want CSS hierarchy
"contents": {
"data": [
{"name" : "header > h1", "value" : "Posts", "prompt": ""},
{"name": "main > p:first-child", "value": "All Posts written by our staff. Blah blah blah", "prompt": ""}
]
} I'm looking at this situation also from the perspective of someone who's trying to support Cj on the backend. Most Ruby libraries I'm working with have a generalist DSL to be re-used by other media types. New top-level properties are a bit harder to add support to, because they may need specific DSL methods, so that's why I'd keep them to a minimum. |
what i think you're proposing is a new i can see the value here:
i can also see some problems:
finally, while i understand the challenges of implementing libraries for media types, i don't want to allow the limitations of some programming languages or frameworks to over-constratin the design of the message. it's a balance, tho. certainly, adding |
I see what you mean by problems… I was really thinking of how an organization might want to pass a random number of contents for views and layouts, but it is true that this makes it almost impossible for a generic client to process. I guess I was looking at the situation from the wrong perspective. Forget about the |
ok, at least for this use case ( an "open property collection" like that can be handy for solving local problems (e.g. custom-built clients) but, as you note, it has the potential to degrade the value of generic implementations. this is something we'll need to deal w/ along the way and we may eventually to what HTML has done. creating the your thoughts on this are most valuable and i appreciate the help in thinking this though. |
add the optional
title
element to thecollection
object. this can be used to present human-friendly titles in UI displays.this can be ignored and the change is backward compatible.
The text was updated successfully, but these errors were encountered: