Makes sense, although one of the implications of cutting out WikiEngine from embedding scenarios is that WikiEngine needs to get a lot dumber. WikiEngine would be more of a configuration-holder where you can find references to things (like a page renderer), and less of an all-singing, all-dancing class with convenience methods for everything.

Take a look at the proposed interface in the API package. It's fairly minimal.

It could still be an all-singing all-dancing class, we would just have a base class which would provide only the necessary functionalities for rendering, then have our own DefaultWikiEngine (or whatever) which would then essentially be the current WikiEngine.

Factories are often useful for creating objects. I did one for WikiContext ("WikiContextFactory"); arguably the PageManager, for example, is or could be a factory class also. Today's WikiEngine serves that role, too -- partly.

I don't like WikiContextFactory; it's just an extra abstraction layer for engine.createContext(), and requires a lot more typing.

One thing we haven't looked at is a generic object-factory e.g.:

I think this is abstracting things too far away. We need to keep things simple and clear, and rotate them around WikiEngine, WikiPage and WikiContext. Everything else is just pretty much scaffolding.

/Janne

Reply via email to