5…4…3…….. and we’re live!

July 26, 2008 § Leave a comment

Well, better late than never!

I missed my Monday deadline, saddly. I was close to pushing out for it – all the necessary features were actually complete. However, some rewriting has taken place, and it was a good idea. I’ve created facade’s over our existing MusicBrainz entities. These facades base themselves on Class::Accessor, which reduces a lot of code duplication for one. It also lets me use my own custom method names, while having the benift of still using an object. It’s not an ideal solution, but it’s the best we have other than plain rewriting MusicBrainz internals.

With the facades wrote, I’ve also introduced Catalyst model components. This, imo, is a great step forward. I mean, look at the total amount of code to display the artist landing page:

sub show : PathPart('') Chained('artist')
{
    my ($self, $c) = @_;
    my $artist = $c->stash->{artist};

    my $show_all = $c->req->query_params->{show_all} || 0;

    $c->stash->{tags}       = $c->model('Tag')->top_tags($artist);
    $c->stash->{releases}   = $c->model('Release')->load_for_artist($artist, $show_all);
    $c->stash->{relations}  = $c->model('Relation')->load_relations($artist, to_type => [ 'artist', 'url', 'label', 'album' ]);
    $c->stash->{annotation} = $c->model('Annotation')->load_latest_annotation($artist);

    # Decide how to display the data
    $c->stash->{template} = defined $c->request->query_params->{full} ?
                                'artist/full.tt' :
                                'artist/compact.tt';
}

A little over 10 lines! Much better than what we had before (if you’re interested, check out the revision history for the artist controller on our trac installation).

Anyway, with these important refactorings complete – the test server has been updated and is now running my branch! This is great news, and I’m hoping to get some feedback – here’s what I posted to the mailing list:

I have set the branch up on my main server, and would find it really helpful if you could spend some time doing some searches for your favourite/most awkward data, and make sure that every thing looks correct – and that all links work.

Here’s how I think you can provide the best information:

Regarding bugs and other quirks, try and file issues as concisely as you can at our bug tracker [http://bugs.musicbrainz.org]. MB have been kind enough to set up a report for me on there (it’s report 34 on that landing page), so as long as you file the bug with the component set to “MusicBrainz Server (TemplateToolkit)” – I’ll get these. Assigning the bug to me is also helpful 🙂

Don’t worry about what you’re filing a bug about, I can sort that out. But for now, just getting feedback is critical before I trudge on with the editing pages.

Please make sure you have a scan through the list first to make sure you’re not duplicating a bug. I am aware of some issues, which I’ll be working on in the background as this server undergoes your ruthless testing. I’ll try and refresh the server in about a week, once I’ve fixed all the outstanding issues.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading 5…4…3…….. and we’re live! at Cycles.

meta

%d bloggers like this: