On Sep 5, 2008, at 12:30 PM, Vincent Massol wrote:
On Sep 5, 2008, at 12:22 PM, Jean-Vincent Drean wrote:
On Fri, Sep 5, 2008 at 12:17 PM, Vincent Massol
<vincent(a)massol.net>
wrote:
At first sight I'd say that using objects (including current tag
feature) would lead to complex queries.
Yes but that's an API problem not a design one.
If our API makes it complex to do queries on objects then we should
fix it. Not do workarounds! Because if we do this then we
acknowledge
that the whole foundation of XWiki is bad (i.e. Class/Objects don't
work). That would be a shame :)
I was thinking about performance too, I've added "at first sight"
because I'm not sure it would be noticeable.
Same comment as above... :)
We should check this since querying objects shouldn't cause any
performance hit or we'll have problems since xwiki is all about adding
objects.
But at least do we agree that the way to add metadata to document is
by using objects?
Question: I've also added a syntaxId field in XWikiDocument a while
back to support the different syntaxes. That should also be a good
candidate for an Object.
Note that if it were an object we would be able to use the object
viewer/editor to modify it's values. I think this would require a UI
change so that modifying objects could be done easily in edit mode (in
a panel on the right).
If we had this then maybe the notion of Language and Parent could be
reimplemented as Objects too.
So do we want to go in the full direction of Objects. I think it would
make a lot of sense and would lead to some very homogeneous design.
Now are there any drawbacks? So far I've heard those that I think are
fixable:
- performance hit
- complex queries
- no permissions on objects
Any others?
Thanks
-Vincent
I think all that's left to do is clarify the relationship between
Objects and XWiki core (i.e. Objects used by xwiki core):
- should they be created automatically by xwiki core if they don't
exist (class + object),
- should they not be created by have default values configured in
xwiki's configuration
- should they be created on first query if not found?
Thanks
-Vincent