On 5/28/07, Vincent Massol <vincent(a)massol.net> wrote:
Hi,
Starting from today I'm going to spend some time every week on the V2
Architecture/Redesign. Today I'd like to start at the heart of the
topic with the domain model. Here's my proposal:
* Model classes are classes representing the XWiki model. The main
classes are:
- Farm
- Wiki
- Space
- Document
- XObject
- XClass
Attachment
XPropertyMeta
XPropertyDefintion
XProperty
- (probably lots of others)
* As you can see I'd like to introduce the Space and Farm objects
* We create a model/ build module in trunks-devs/xwiki/model for
storing model classes
* Model classes cannot access other classes outside of the model/
module. They are meant to be used by components to provide services
but they shouldn't provide services themselves. They can methods to
manipulate their fields and they can call each other but they cannot
call outside of their model.
* We use the org.xwiki.model package for storing Model classes
* These model classes are all user public (API)
WDYT?
Agree
Barring any negative feedback I'll start implementing this today and
in the coming days. One question that remains unanswered in my mind
is how do we integrate back these model classes into the V1
architecture. I think we should be able to retrofit the existing
classes to use these classes by composition. For example the Document
object could have 2 fields: one org.xwiki.model.Document and one
org.xwiki.model.Space. The XWiki object could have 2 fields: Wiki and
Farm, etc. I'm not sure how this would work out though. Any idea is
welcome.
Thanks
-Vincent
Agree for XWiki, but I don't know why should we have a Space object in
the old Document. Are there any Space methods in the current code?
You have my support. As much as my time allows, I'll help you on this.
Sergiu
--
http://purl.org/net/sergiu