[mb-devel] Cleanup release
Matthias Friedrich
matt at mafr.de
Thu Sep 28 15:41:26 UTC 2006
On Tuesday, 2006-09-26, Robert Kaye wrote:
[...]
> I would like to hear more about your thoughts about a cleanup
> release. Can you please elaborate more on what you think should go
> into such a release?
First of all, go through all mb_server bugs in trac and evaluate them.
Either fix them, close them as invalid (and state why) or explain why it
can't be implemented at the moment. Start with the annotation processing
regexp bug, for example.
Then separate business logic from display logic. Go through the HTML
pages and move complex code to modules. The code in the module (let's
say View::Track) should fetch all the required data from the database
and make it available as an easily accessible object. In the mason
pages, only trivial looping over lists and displaying data should be
done. That way, the HTML pages can be maintained by people who don't
know Perl. ArtistPageRedesign-BRANCH has code which demonstrates how it
works [1].
Fix the AR modules so that an experienced developer can understand it in
acceptable time. I know under which circumstances it was written, but
some of the code (mostly embedded SQL) is way beyond unreadable. AR is
far from trivial, but not *that* complicated. I learned how it worked
from the database schema, the AR modules were just frustrating.
Next is the Moderation system, the old enemy. Look at Moderation.pm:
There's even embedded HTML in there. Then get rid of /comp/entermods. It
should be possible to instantiate the Moderation subclasses directly,
not through a weird hash-based factory mechanism. That way their
constructors can check the arguments and things don't have to be
extracted from obscure hashes. This also makes moderations testable
properly from outside the HTML pages.
I've written about improving the mb_server installation process already.
One more idea: Put a script into the top level directory that is the
one-stop access to all tasks about setting up and running a MusicBrainz
server, from a DB-only replication client to a full-fledged development
server. It should create directories with correct permissions, tell you
which DB snapshots to download, import them for you, run regular tasks
like creating reports, maybe even check if you have all perl modules
installed etc.
Go through the admin directory and remove the tools which are outdated
and/or not in use. Write a README describing what each of them does.
Update the documentation about mb_server, both in the distribution and
on the wiki.
That's all I can think of for the moment, but it's a lot of work
already.
Cheers,
Matthias
[1] http://bugs.musicbrainz.org/browser/mb_server/branches/ArtistPageRedesign-BRANCH/cgi-bin/MusicBrainz/Server/View/ArtistTracks.pm
More information about the MusicBrainz-devel
mailing list