Thursday, July 21, 2011

Recordings is moving on!

Hey everyone -- this is going to be a short post. I plan on posting a few more things related to jqPlot (our favorite plotting library) hopefully in the next week but in the mean time...

My colleague is finishing up our last feature complete task and I've been moving to our next stage: setting up the build system. Right now I have Hudson building our main branches, running tests, findbugs, etc. and packaging it all into a nice war file. The next step is to set up an Amazon EC2 micro instance to do this, as I've been doing it on a local VM with a Ubuntu image.

In the meantime, here are some screenshots of our project.

The main data page, where you can browse/filter/search the database

The graphs page (my favorite!)

The recording detail page, where you can comment and recommend it
And remember ... our user interface changes a lot since we're always tweaking it, so don't consider anything final!

Sunday, July 10, 2011

Choosing a text scroller plugin for the side bar

So a few quick notes: We are slightly behind on our feature complete milestone because we decided to add a new feature. But we should be good within a week or so.

In the meantime, I've been working on implementing a "recent changes" text scroller on the left side of our website. This will show the most recent comment posts, recording/song additions, and any additions we make as well. I'm personally not doing the data side of this (although I might if we get time constrained) so my job is just the front-end.

Naturally I'm very lazy, so I prefer a pre-existing solution to making blocks of text scroll vertically. I like javascript and jQuery, but I don't want to spend too much time writing something like that. So I went looking for such a plugin.

And after looking at a good dozen or so different plugins, which for one reason or another I couldn't get to work with our text blocks, I finally settled on one called SerialScroll. Here's a list of features relevant to us:
Recent Changes Side-bar
  1. Vertical scrolling
  2. Support for arbitrary scrollable items specified with CSS selectors
  3. Auto scrolling
  4. ~4 kb  total size

Starting from the "News Ticker" demo at the demo page, I was able to customize it for our page and retrieve its content via AJAX.

I realize it's not too exciting since you can't see it scrolling, but just trust me that it does, in fact, scroll. Although we might change the look, this looks like the plugin we'll stick with.

Oh and for reference, here's our javascript:

 $('#changelist').load('recentchanges .changeitem',function()
 {  
  $('#changelist').serialScroll({
 
   force: true,
   axis: 'y',
   items:'.changeitem',
   interval: 2000,
   easing:'linear',
   lazy: true,
   step:1,
   start:0,
   cycle:true,
   jump: true,
   event: 'click'
  }); 
 });