[xwiki-devs] Rewriting the comments plug-in into a component
Hi devs, We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations. The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes? Thanks, Florin Ciubotaru
Hi Florin, On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components. Thanks -Vincent
Hi Vincent, Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
Thanks -Vincent _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Florin Ciubotaru wrote:
Hi Vincent,
Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
+1 for 2. I find it way faster and more "agile" than the other. We won't get 1) right from the first shot and we would spend time doing it and also delay people from doing components until the bridging is done. More, that's the whole point of the document access bridge, afaik, to be enriched by whoever needs it. This is very cool and possible when you plan to commit in the platform, the problem is with the products that must use the bridges as they are and they need more...
Thanks -Vincent _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Hi Florin, On Oct 31, 2008, at 12:35 PM, Florin Ciubotaru wrote:
Hi Vincent,
Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
We've already chosen solution 2). However there are 2 speeds: * We have committers working on reimplementing existing parts of XWiki (rendering, wysiwyg editor, storage, velocity, localization, etc). When these parts are finished other components should use them and not go through the bridge * We have committers like yourself working on new components. If there are no "clean" componentized solution then they should use and enrich the bridge when needed and help refactor the code later on when clean components are ready. Thanks -Vincent
Florin Ciubotaru wrote:
Hi Vincent,
Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
Definitely 2. This is the strategy we use already. The motivation is that: Bridges should be a temporary workaround until we have the time to implement the actual components. But we don't want to waste too much time on the bridges, since this time would be better spent writing the components themselves. Also, we don't want to have to change too much code once the bridges are no longer needed, so the bridge interface should be as similar as possible to the future components. But since we don't know how the components will really look, we can only estimate, and the less we have to estimate, the more likely we won't have discrepancies. Thus the minimality + on the fly approach to writing bridges. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
Florin Ciubotaru wrote:
Hi Vincent,
Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
Definitely 2. This is the strategy we use already. The motivation is that:
Bridges should be a temporary workaround until we have the time to implement the actual components. But we don't want to waste too much time on the bridges, since this time would be better spent writing the components themselves. Also, we don't want to have to change too much code once the bridges are no longer needed, so the bridge interface should be as similar as possible to the future components. But since we don't know how the components will really look, we can only estimate, and the less we have to estimate, the more likely we won't have discrepancies. Thus the minimality + on the fly approach to writing bridges.
BTW, I have a first patch for DocumentAccessBridge, who can review it and potentially aplly it?
Florin Ciubotaru wrote:
Sergiu Dumitriu wrote:
Florin Ciubotaru wrote:
Hi Vincent,
Vincent Massol wrote:
Hi Florin,
On Oct 31, 2008, at 10:56 AM, Florin Ciubotaru wrote:
Hi devs,
We currently have a comments plug-in that is written for a custom core. This plug-in enables us to have hierarchical comments and several storage implementations.
This sounds very cool (threaded comments have been asked several times). Can you give more information: * Where is it located? * Is there a design page for it or at least what's the full spec for it? * What's your roadmap for it?
The plug-in was written initially by Raluca and Ludovic and is located here: - https://svn.xwiki.org/svnroot/xwiki/sandbox/plugins/comments/ There was an old design page for it but it was outdated and afterwards deleted. Now we have only a layout design page, here: - http://dev.xwiki.org/xwiki/bin/view/Design/NewCommentsImplementation The first thing we should do is to see how we can integrate it with the platform. Ludovic made a patch for the core, can you review it and see if you can apply it? I need to finish the test suite for it and do some refactoring. My intention is to rewrite the plug-in into a component but I'm starting to doubt that I can do that at the moment.
The issue I encounter when rewriting it to a plexus component is that I cannot make it independent from the core. I need both read and write access to the storage, and I could not find a bridge to it. All I can do is retrieve data, with org.xwiki.bridge.DocumentAccessBridge and org.xwiki.bridge.DocumentModelBridge, but not write data. Does anybody know how can I write a component that needs read/write access to the storage without using XWiki,XWikiDocument and XWikiContext classes?
For now you'll need to add methods to the bridge as I don't think Artem has done the conversion of the storage to proper (i.e. using the new architecture and not the old xwiki context one) components.
As we approach XWiki 2.0 we should put more effort into creating the bridges that we need, so that will have a fully component oriented architecture. The problem is that we cannot create really powerful components, right now. I think we should avoid using 1.0 elements in the new components. The only things that we should change, when breaking the core into pieces, are the bridge components implementation. This also applies for the storage and other changes. I see two options: 1) We first analyze what bridges we need and start developing them. And only after that we switch to heavy implementation of components; 2) We write and enrich the bridges on the fly as we create new components. Which do you think is the best one?
Definitely 2. This is the strategy we use already. The motivation is that:
Bridges should be a temporary workaround until we have the time to implement the actual components. But we don't want to waste too much time on the bridges, since this time would be better spent writing the components themselves. Also, we don't want to have to change too much code once the bridges are no longer needed, so the bridge interface should be as similar as possible to the future components. But since we don't know how the components will really look, we can only estimate, and the less we have to estimate, the more likely we won't have discrepancies. Thus the minimality + on the fly approach to writing bridges.
BTW, I have a first patch for DocumentAccessBridge, who can review it and potentially aplly it?
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
I will, if you put it on jira. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (5)
-
Anca Paula Luca -
Florin Ciubotaru -
Florin Ciubotaru -
Sergiu Dumitriu -
Vincent Massol