[pmwiki-users] Markup engine global improvement

Joachim Durchholz jo at durchholz.org
Wed Jul 6 09:19:49 CDT 2005


Dominique Faure proposed:
> Encapsulate all the markup stuff into a class (as it has already been
> made for PageStore). This way, it could be a lot easier for the
> engine to generate something else than (x)html from wiki page: pdf,
> latex, rss,...

No, it wouldn't. The table-driven approach used in PmWiki works just as
well.

OO is, in large parts, just a fashion. Wrapping stuff in classes just 
because that is "the OO way" doesn't automagically improve the structure 
of the software - on the contrary, it tends to distribute the logic 
across a class hierarchy. Unless you have a very firm understanding of 
what you're doing, you end up with a software that's less maintainable.

I wouldn't object to wrapping parts of PmWiki into classes, *but only if 
that gives us a concrete advantage*. Simply claiming (hoping?) that some 
process would be easier isn't going to cut it - you'd have to say where 
the problems are, and how they're going to be eased when introducing 
classes.

PageStore is the one exception where stuff was wrapped into a class. It 
turned out that the class is missing an important abstraction, namely 
page renames. Writing a variation of that class would break at least the 
Rename recipe.

Regards,
Jo



More information about the pmwiki-users mailing list