[pmwiki-users] Ingredients . . .

Ben Wilson dausha at gmail.com
Sat Feb 4 09:47:32 CST 2006


As a lot of you, I've been involved with PmWiki for some time. I have
a July 26, 2004 journal entry that mentions that I had abandoned
Drupal because it was poorly organized and its core authors changed
key portions of the code so quickly that it became a job just to keep
my various modules compatible with the more recent versions. Having
moved to PmWiki for over 18 months (just a little longer than my
younger son), I can say that there have been few changes that have
upset the happy equilibrium of my web sites--and most of those changes
were invited. :-) The hardest change was from v1 to v2, and maybe the
pagelist changes of late, but that's more of a nit.

That said, I've scripted a few recipes and tinkered with a few more.
I've noticed certain bits of code are used repeatedly throughout
various recipes. I would invite the community to cull through the code
and find which routines are more commonly used and may be worth
pulling out of individual recipes and turned into "ingredients." I
think so doing would reduce the size of code, improve the authoring of
new code, and produce more maintainable recipes overall.

Reducing Code Size: This is probably the least important benefit,
because the software overall is not very large to begin with. I've
never noticed a significant bottleneck in terms of runtime.

Authoring New Code: When you already have certain tried-and-true
methods for doing certain things, piecing them together to make
something different is all the easier. This is the key thought behind
both OO programming and orthogonal programming; or in other words
adhering to the DRY principle (Don't-Repeat-Yourself).

Recipe Maintnenance: Ingredients make for easier maintenance. With
ingredients, it becomes possible to set up standard tests that can be
conducted (or if automatic, run) against each new release of PmWiki,
and problems would be more readily fixed that would affect multiple
recipes at the same time. Ingredients would probably be managed by
their own set of PITS.

Just a thought.
Ben




--
Ben Wilson
" Mundus vult decipi, ergo decipiatur"




More information about the pmwiki-users mailing list