On Jun 28, 2009, at 1:53 PM, Thomas Mortagne wrote:
And the
calls to the access bridge are OK, since they are supposed
to be
replaced with calls to the new model once it is in place, so all the
code that needs access to the model *should* use the bridge. Once we
have the new model in place, the default bridge implementation will
use
it instead of the old core.
When the bridge already have all needed but we are
mapping more and
more model in the bridge which is wrong IMO.
I don't vote against it so if everyone is +1 go for it but i don't
like adding temporary code when there is no good reason.
I take advantage of this mail in order to ask for a clarification
about this bridge-related-issues.
The REST subsystem uses the model and the API defined in xwiki-core
and doesn't make use of the bridge at all.
Thomas' argument explains why I did this : since I need access to the
complete XWiki API for exposing it via REST, basically I would have
had to rewrite a "duplicate" of the API in an interface (the bridge)
that is, to my understanding, temporary and that will be discarded
once a new model (and its API) will be available.
However from what Sergiu says I understand that the bridge is there to
stay, so this invalidates my hypothesis.
Since, at some point, we should port the REST subsystem to the "new
thing" that is independent from core, the question is: is the bridge
this "new thing" and we should enrich it to support the complete XWiki
API or we should wait for the new model in order to avoid work that
will be discarded because the bridge is going to disappear as well?
I tend to agree with Thomas: bridged code is going to be changed anyway,
so for modules that are heavy consumers of the model (like the REST
sub-system), I think bridging is just adding more pain, since in both
cases the whole thing will be refactored with the new model.
For modules that are not heavy consumers of the model, the bridge allows
to not depend on xwiki-core which is desired and more elegant. I still
think they should be refactored with the new model, getting rid of the
bridge.
At least that's how I see it.
Jerome.
Thanks,
Fabio
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs