Wikiperl Refactoring

Whiteknight on 2008-09-07T12:43:12

Wikiperl, the MediaWiki editing application that I discussed here last time, is my first real application that I've developed and released into the wild. Most programs and tools that I've written have been for my own benefit only, and so I haven't had to get into the finer points of production software development and maintenance.

I have two version of the software, one has a Tk front end (which is easy, but looks terrible on some platforms) and the other is a Gtk2 frontend. Maintaining both separately is not really acceptable, especially as the feature list of one starts to grow beyond the feature list of the other. To resolve these problems, I've started a major refactor of the application to be more modular and flexible. A major part of this refactor is to abstract the interface to the GUI routines so they are more pluggable.

I was out of town on business tuesday and wednesday, and I wanted to do some Wikibooks editing while I was on the plane. So, I used wikiperl to download copies of all the pages in the "Parrot Virtual Machine" book that I've been writing over there. I spend the two days editing the files, and then I used the upload function to merge the changes I made back into Wikibooks. That's when it struck me: This particular interface was a lot like SVN and other version control. I've decided therefore that I'm going to add a version control mode to the program that will download local copies of pages and check timestamps to determine if a local version is more recently modified then it's corresponding page in the "repository".

An SVN-like interface is a feature for another time, I think. Right now I've got a lot of refactoring to focus on if I ever want to make a real official release of this thing.