incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.r.jaqu...@gmail.com>
Subject Wiki configuration
Date Sun, 10 May 2009 12:56:49 GMT
Hi --

There's lots of insanity going on with things like
WikiEngine.getAllInlinedImagePatterns, which do nothing except
delegate to JSPWikiMarkupParser.getImagePatterns(WikiEngine)... which
just rips through the jspwiki.properties and returns a String
collection. It's called just once, by... wait for it... WikiEngine.

Now, I know why this was done. It was to prevent WikEngine from being
gigantic. That makes sense, but it seems to me we could be doing this
a bit differently.

For example, we could create a new class called WikiConfiguration (or
something like it) that configures and stores state for things like
that, like inline images, the names of configured spaces, etc. This
would be configured just once, at startup. All of the gnarly
property-parsing stuff could go there. One variant on it could be
PropertyFileConfiguration (which reads property files). Another could
be a MemoryConfiguration for testing purposes. Embedders could write
their own if they wanted to embed a wiki that "just works" without
much configuration at all, or one that reads from their own config
files.

Thoughts?

Andrew

Mime
View raw message