Also we will want to expose all theses refactoring action easily on the UI and we could maybe have a generic Refactoring interface taking described parameters and with a unique execute method exactly what we do for macros. Would be Wiki transformation where macros are XDOM transformations. On Tue, Apr 7, 2009 at 14:31, Thomas Mortagne <[email protected]> wrote:
On Tue, Apr 7, 2009 at 14:06, Asiri Rathnayake <[email protected]> wrote:
Hi Devs,
I have committed the initial xwiki-refactoring module which has support for splitting a document into multiple documents.
The design of the DocumentSplitter component is somewhat like http://i39.tinypic.com/28k24w4.png (there are few minor changes).
Anyway, we need to think of a proper desgin for the Refactoring module that will allow us to extend this module in future. I can see two approaches for this desgin:
1. We implement each refactoring operation as a single component - like currently it is done with DocumentSplitter. But this might not be a good idea because the refactoring module itself will not provide a well-defined API to users (it will be scattered into multiple component interfaces).
2. We define a single Refactoring plexus component interface that will include all the currently suppported refactoring operations (like a facade) - this way we have a high-level refactoring interface that can be easliy understood and used by users.
I think the 2 approach is more usable than the first one.
WDYT? may be there is a third approach?
2. sounds the contrary of extensibility. We need a different component for each (groups of) refactoring action, the question is not here IMO. If we really need a general RefactoringAll which use the different components behind the scene we can do it but I doubt we need it.
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne