Work progressing on moderations, problems with add release…

October 24, 2008 § 4 Comments

Hi folks, seems we’re a bit overdue for an update!

Work has been progressing well, after we made some important design decisions – I’ve mainly been focusing on 2 areas at the moment. The first of these areas is the moderation queue.

I have this looking fairly complete – it just needs polishing. At the moment you can view a list of all open moderations, view specific moderations, add edit notes and vote on these edits. I’m using a similar system to the existing code base, whereby each moderation has a template to show how the details of the change should be displayed. So one major area I still need to do is write all these change-templates.

Along with these templates, I still need to devise a system to filter edits (much like our current advanced edit search) – but I’d like to try and get something a little bit cleaner than the code we currently use. At the moment, once the user submits the search form, we hand craft a SQL query – which results in quite a lot of complex code. I’m considering using a chained system to formulate the query; something along the lines of

$c->model('Moderation')->filtered->
                         edit_type('MOD_EDIT_RELEASE')->
                         status('any')->
                         automod(0);

I’m hoping this will make for cleaner code in the controllers, but also the option to make use of specific moderation-filters in other places (maybe a per user dashboard, where users can decide what edits they want to see?)

Moving away from moderation, I’m working on the add release form, and I’m currently finding this one of the hardest challenges of the project. It’s also probably one of the most (if not the most) important forms we have on the site – so getting this working correctly is highly important. However, interactions with this form are very tricky to model.

The largest problem, is that the path is very much non-linear, for non-trivial edits. Let’s consider a 5 track, various artists release, with 2 release events. This would require the following steps:

  1. Specify that we need 5 tracks
  2. Enter the details of the release
  3. For each track, display a search form for the user to select the artist (my branch will not have AJAX until everything can be done without it).
  4. Search for the label for the 2 release events, allowing the user to select them.
  5. Enter a moderation note, and insert the moderation into the queue.

However, this can be become even more complex – consider the case where the artists/labels do not exist, so the user needs to be redirected to an add artist form. Or maybe the user wants to change an artist they have already confirmed… see how this is starting to become a little bit more complicated, with a very non-predictable path?

While each of these stages can be done on their own, the problem I am having is to work out a solution to keep track of the user progress, and make all of these stages transparently tie together.

If anyone has any experience working with muilt-page forms, I’m certainly curious to hear how you’re doing it. I’ve had feedback from some people pointing me towards a staleless RESTful solution, and others saying I should save the results in the session.

Advertisements

§ 4 Responses to Work progressing on moderations, problems with add release…

  • Mayhem says:

    > At the moment, once the user submits the search form, we hand craft a SQL query – which results in quite a lot of complex code.

    Please don’t spend any time on that — I realize the code may be ugly, but that code will be thrown out after the next next release, so there is little point is improving it.

    Regarding the release editor — that is obviously quite complex. If I were in your shoes, I would:

    1. Map out the flow of the editor.
    2. Draw a state diagram.
    3. Implement the editor using a Finite State Machine [0]

    I would shove the state data into the person’s session — its easy and works well. Just make sure to clean up the session once the edit is entered/cancelled.

    [0] http://en.wikipedia.org/wiki/Finite_state_machine

  • warp says:

    The trouble with sessions is, they’re gone when your browser crashes. This is a very real concern for me when entering releases into a musicbrainz. It’s not much of a problem for a typical pop release, but when you’re dealing with a 30-track obscure various artist release it can take up to an hour to go through the whole add release procedure.

    At work I’m involved with a survey application. A survey is just a big form with dozens of pages, whenever I re-open the survey after I have closed my browser I can just continue where I left off. Maybe I’m spoiled because of that, but the user experience is so much better.

  • acidcycles says:

    Warp, a very good point (though is there not a way to make sessions consistent even when the browser window closes? LIke closing the window doesn’t log you out…) – I did consider that we could do something similar to sessions, but all server side, by slightly abusing memcached to store the data as we go along with the wizard.

  • warp says:

    Well, you need some way to navigate back to the session you were working on, but other than that you could probably just use proper cookies instead of session cookies to refer to the users’ sessiondata.

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 Work progressing on moderations, problems with add release… at Cycles.

meta

%d bloggers like this: