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.

Milestone 1 – almost there!

July 19, 2008 § Leave a comment

I bring good news, Template Toolkit followers!

I’ve decided given the current progress I’m making with my T::T branch, that I’m setting down a solid milestone. The first of these milestones will be the read-only interface to MusicBrainz.

Now I should probably expand on what I mean by this. By read-only, I mean that anyone visiting the site can view, and does not need to be logged in. In particular it relates to viewing artists, releases, labels, etc – the core entities in MusicBrainz.

I think I’m very close to having this done, so I’m setting myself a deadline – this milestone will be completed by Sunday. Whether I’ll make it, we shall see, but I’m really hoping to – and it certainly feels feasable. Once I reach this milestone, I’ll try and call for testing (posting on the lists and possibly the main blog).

Exciting to see some true, measurable progress! About time, with only a little over a month left 🙂

A much needed status update

July 9, 2008 § Leave a comment

Hello GSOC followers, don’t worry – I’m not dead! I’ve just been working hard on my project and have forgotten to keep everyone posted on how work is progressing!

In the last week I’ve spent some time tidying up my code. The user authentication now uses the Catalyst::Plugin::Authentication system (very nice plugin) – with a custom store to access our current authentication system (UserStuff). Alongside that I’ve improved the way login redirection is handled, so it now requires 0 lines of code to mark a page as “only visible to authenticated users.”

Work has progressed on form handling as well. I’ve decided to continue using Form::Processor as my validation library of choice, and I’m very happy with this decision. Because it does not render forms, I spent a day or 2 working on a small template library for working with forms – which makes adding forms a breeze. A benefit of this increased flexibility is that I have now been able to work on the user preferences page – this is readonly for the moment, but all data comes out of the db as you’d expect. It will take minor tweaks to complete this (I’m hoping!)

In regards to the artist page, I think I’ve finished the read-only chunk of this to about 85% – it still needs the tag display, and also needs some tweaks on the artist landing page (whether to use full view or compact view, which release types to show, etc).

Work has been slow yesterday and today because I’ve installed Ubuntu so I can run the server locally – but InitDb.pl is causing some (apparently well known) headaches. So… Rob, stop breaking things! Oh, and just because I haven’t been hacking, I still have got some important work down. I’ve started work on the documentation – I really need your feedback on this. My documentation writing skills are somewhat… lacking.

A quick run down of what’s coming up next: I’m going to finish the user controller. The final stages of this are “forgot password”, the small checkboxes about remember me/single ip, saving user preferences and nominating for auto-editor.

Feel free to give the new site a try, too! Electrological is running the latest and greatest (usually) revision of my branch, so have a bounce around. If anything doesn’t work – please file a bug. Don’t think to yourself “Hmmm, he probably knows about this” – the more bugs the better! Let me do the sorting 🙂

Where Am I?

You are currently viewing the archives for July, 2008 at Cycles.