[xwiki-devs] [discussion] Object property references separators
Hi all, I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final). In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far: A wiki:Space.Page^objectName#property B wiki:Space.Page^objectName$property which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts. Also, we had: C wiki:Space.Page^objectName;property and also: D wiki:Space.Page:objectName.property Which one would you prefer? Any other proposals? Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose). Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types. WDYT? Thanks, Anca
On Mon, Jan 25, 2010 at 21:55, Anca Luca <[email protected]> wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts.
+1, i would prefer we stay away of velocity keywords
Also, we had:
C wiki:Space.Page^objectName;property
+0.5, ; look weird to me (no better argument)
and also:
D wiki:Space.Page:objectName.property
-1, too hard to read for user and know what is wiki name, object etc. another proposal: E wiki:Space.Page^objectName^property
Which one would you prefer? Any other proposals?
And you ? ;)
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types.
Object and Object Property are standard entity and should be supported by default anyway. If you implement it with some separators in annotation and separator chosen for standard are not the same it will be a pain to get rid of your custom code in annotation.
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 01/26/2010 01:34 PM, Thomas Mortagne wrote:
On Mon, Jan 25, 2010 at 21:55, Anca Luca<[email protected]> wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts.
+1, i would prefer we stay away of velocity keywords
Also, we had:
C wiki:Space.Page^objectName;property
+0.5, ; look weird to me (no better argument)
and also:
D wiki:Space.Page:objectName.property
-1, too hard to read for user and know what is wiki name, object etc.
another proposal:
E wiki:Space.Page^objectName^property
I wonder if users would be puzzled by 2 identical separator, but otherwise I'm fine with it.
Which one would you prefer? Any other proposals?
And you ? ;)
I don't know, for example we could use an arrow or a dot? (I like the dot for prop separator because it's very natural). F wiki:Space.Page^objectName>property G wiki:Space.Page^objectName.property
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types.
Object and Object Property are standard entity and should be supported by default anyway. If you implement it with some separators in annotation and separator chosen for standard are not the same it will be a pain to get rid of your custom code in annotation.
Indeed this is a problem. But it could happen anyway, even for document references which could cause some issues, including in core. But for annotations, as long as all users of annotations service (that is devs calling it) use the resolvers & serializers in the annotation-reference module (as it is called right now), there shouldn't be any problem changing, since that module can change to use the default separators transparently. The only issues would be: * migration of existing annotations, on upgrade * any calls which build the references "manually" as in actually do a concat or something (which shouldn't happen now, since we'd have the document references), for example from some velocity scripts. I do prefer implementing it in the core. Thanks, Anca
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Anca Luca wrote:
On 01/26/2010 01:34 PM, Thomas Mortagne wrote:
On Mon, Jan 25, 2010 at 21:55, Anca Luca<[email protected]> wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property
-0.5 (# == URL special character)
B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts. +1, i would prefer we stay away of velocity keywords
Also, we had:
C wiki:Space.Page^objectName;property +0.5, ; look weird to me (no better argument)
and also:
D wiki:Space.Page:objectName.property -1, too hard to read for user and know what is wiki name, object etc.
another proposal:
E wiki:Space.Page^objectName^property
I wonder if users would be puzzled by 2 identical separator, but otherwise I'm fine with it.
Which one would you prefer? Any other proposals? And you ? ;)
I don't know, for example we could use an arrow or a dot? (I like the dot for prop separator because it's very natural).
F wiki:Space.Page^objectName>property -0.5 (> == HTML special character)
G wiki:Space.Page^objectName.property +1 '.' is (will be) escaped in document names so will also be escaped in object names. ^ will also need to be escaped in object names.
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types. Object and Object Property are standard entity and should be supported by default anyway. If you implement it with some separators in annotation and separator chosen for standard are not the same it will be a pain to get rid of your custom code in annotation.
Indeed this is a problem. But it could happen anyway, even for document references which could cause some issues, including in core.
But for annotations, as long as all users of annotations service (that is devs calling it) use the resolvers & serializers in the annotation-reference module (as it is called right now), there shouldn't be any problem changing, since that module can change to use the default separators transparently. The only issues would be: * migration of existing annotations, on upgrade * any calls which build the references "manually" as in actually do a concat or something (which shouldn't happen now, since we'd have the document references), for example from some velocity scripts.
I do prefer implementing it in the core.
Thanks, Anca
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Tue, Jan 26, 2010 at 14:57, Caleb James DeLisle <[email protected]> wrote:
Anca Luca wrote:
On 01/26/2010 01:34 PM, Thomas Mortagne wrote:
On Mon, Jan 25, 2010 at 21:55, Anca Luca<[email protected]> wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property
-0.5 (# == URL special character)
I don't think URL special characters are really an issue, you usually don't use this kind of document reference directly in an URL. But anyway it's really a pain for velocity which is worst.
B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts. +1, i would prefer we stay away of velocity keywords
Also, we had:
C wiki:Space.Page^objectName;property +0.5, ; look weird to me (no better argument)
and also:
D wiki:Space.Page:objectName.property -1, too hard to read for user and know what is wiki name, object etc.
another proposal:
E wiki:Space.Page^objectName^property
I wonder if users would be puzzled by 2 identical separator, but otherwise I'm fine with it.
Which one would you prefer? Any other proposals? And you ? ;)
I don't know, for example we could use an arrow or a dot? (I like the dot for prop separator because it's very natural).
F wiki:Space.Page^objectName>property -0.5 (> == HTML special character)
G wiki:Space.Page^objectName.property +1 '.' is (will be) escaped in document names so will also be escaped in object names. ^ will also need to be escaped in object names.
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types. Object and Object Property are standard entity and should be supported by default anyway. If you implement it with some separators in annotation and separator chosen for standard are not the same it will be a pain to get rid of your custom code in annotation.
Indeed this is a problem. But it could happen anyway, even for document references which could cause some issues, including in core.
But for annotations, as long as all users of annotations service (that is devs calling it) use the resolvers & serializers in the annotation-reference module (as it is called right now), there shouldn't be any problem changing, since that module can change to use the default separators transparently. The only issues would be: * migration of existing annotations, on upgrade * any calls which build the references "manually" as in actually do a concat or something (which shouldn't happen now, since we'd have the document references), for example from some velocity scripts.
I do prefer implementing it in the core.
Thanks, Anca
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Tue, Jan 26, 2010 at 1:34 PM, Thomas Mortagne <[email protected]>wrote:
E wiki:Space.Page^objectName^property
+1 On Tue, Jan 26, 2010 at 2:52 PM, Anca Luca <[email protected]> wrote:
G wiki:Space.Page^objectName.property
+1 I am for using any of these 2 separators. They look clean and easy to spot i think. -1 for using reserver characters and i am not referring only about html or velocity. Thanks -- Flavius Olaru
Hi Flavius, On 01/26/2010 07:34 PM, Flavius Olaru wrote:
On Tue, Jan 26, 2010 at 1:34 PM, Thomas Mortagne <[email protected]>wrote:
E wiki:Space.Page^objectName^property
+1
On Tue, Jan 26, 2010 at 2:52 PM, Anca Luca<[email protected]> wrote:
G wiki:Space.Page^objectName.property
+1
I am for using any of these 2 separators. They look clean and easy to spot i think. -1 for using reserver characters and i am not referring only about html or velocity.
what else do you have in mind? Thanks, Anca
Thanks
Hi devs, I would so much like to commit XWIKI-4775, at least in 2.3. So, we for the separators, so far we have: 1/ wiki:Space.Page^objectName#property 1 +1 (I recorded Vincent here), 1 -0.5, 1 -1 2/ wiki:Space.Page:objectName.property 1 -1, 1 +1 3/ wiki:Space.Page^objectName;property 1 +0.5, my +1 which I will change now 4/ wiki:Space.Page^objectName.property 2 +1 5/ wiki:Space.Page^objectName^property 1 +1 My +1 goes for 4/ which I will commit soon if nobody has anything against it. Re-explanation of the thing: As a result of the discussion at http://markmail.org/thread/uj34lvnjgrnlf6vm and some other live discussion, we concluded that we would implement the objects and object properties references _as if_ every entity had a free name (unique, human readable string name to identify it among all other entities of the same type in the same context). However, for the moment we don't have a good approach for how _exactly_ to name objects, so we won't implement a specific way to name them, we'd have the support for generic object references but not the names themselves, which would be the responsibility of the application _actually_ using the object references (none in core, ftm, only annotations on sandbox). To get a flavour about how this would happen at this point, take a look at the way IndexedObjectReference [1] in the annotation references module extends the ObjectReference[2] in the patched model, to implement a specific way of naming. Now, in order to actually commit XWIKI-4775, the support for generic object references (with unspecified name), we need to agree on a separator, which would be harder to change afterwards, when we decide on the actual name. [1] http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-annotation-parent/x... [2] http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-annotation-parent/x... Thanks a lot for the help, Anca On 01/25/2010 10:55 PM, Anca Luca wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts.
Also, we had:
C wiki:Space.Page^objectName;property
and also:
D wiki:Space.Page:objectName.property
Which one would you prefer? Any other proposals?
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types.
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi devs, On 03/01/2010 01:05 PM, Anca Luca wrote:
Hi devs,
I would so much like to commit XWIKI-4775, at least in 2.3. So, we for the separators, so far we have:
1/ wiki:Space.Page^objectName#property 1 +1 (I recorded Vincent here), 1 -0.5, 1 -1
2/ wiki:Space.Page:objectName.property 1 -1, 1 +1
3/ wiki:Space.Page^objectName;property 1 +0.5, my +1 which I will change now
4/ wiki:Space.Page^objectName.property 2 +1
5/ wiki:Space.Page^objectName^property 1 +1
My +1 goes for 4/ which I will commit soon if nobody has anything against it.
Seems that 4/ has won. Closing the vote, starting to prepare XWIKI-4775 patch and commit for 2.3M1. Thanks, Anca
Re-explanation of the thing: As a result of the discussion at http://markmail.org/thread/uj34lvnjgrnlf6vm and some other live discussion, we concluded that we would implement the objects and object properties references _as if_ every entity had a free name (unique, human readable string name to identify it among all other entities of the same type in the same context). However, for the moment we don't have a good approach for how _exactly_ to name objects, so we won't implement a specific way to name them, we'd have the support for generic object references but not the names themselves, which would be the responsibility of the application _actually_ using the object references (none in core, ftm, only annotations on sandbox). To get a flavour about how this would happen at this point, take a look at the way IndexedObjectReference [1] in the annotation references module extends the ObjectReference[2] in the patched model, to implement a specific way of naming.
Now, in order to actually commit XWIKI-4775, the support for generic object references (with unspecified name), we need to agree on a separator, which would be harder to change afterwards, when we decide on the actual name.
[1] http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-annotation-parent/x...
[2] http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-annotation-parent/x...
Thanks a lot for the help, Anca
On 01/25/2010 10:55 PM, Anca Luca wrote:
Hi all,
I would like to go ahead with committing http://jira.xwiki.org/jira/browse/XWIKI-4775 before the 2.2 final release (because I would like annotations to work as clean as possible on 2.2 final).
In order to do that, we need to agree on a set of separators for the object name and property name. There have been the following proposals so far:
A wiki:Space.Page^objectName#property B wiki:Space.Page^objectName$property
which has received some votes in http://markmail.org/thread/uihq4mmwgaufbcz6 but I personally would stay away from # and $ separators since they're reserved characters in velocity scripting language and it might be uncomfortable for using refs in scripts.
Also, we had:
C wiki:Space.Page^objectName;property
and also:
D wiki:Space.Page:objectName.property
Which one would you prefer? Any other proposals?
Any separator should be easy to implement, and roughly anything could be used as a separator (so feel free to propose).
Note that there is an alternative to this, to make annotations implementable on 2.2: only add the two entity types (Object and Object Property) along with making the string serializer and string resolver extensible so one could add its own separators for the 2 new types.
WDYT?
Thanks, Anca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (4)
-
Anca Luca -
Caleb James DeLisle -
Flavius Olaru -
Thomas Mortagne