View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

CS 2340 Spring 2001 - My JukeBox!

I have benefited from the past case pages put up by students who took this course before I did, so I hope that my case page here would be helpful to anywhere who's searching around the coweb for an answer to the tough projects that we have to tackle. ~ ChokSheak Lau

The Eclectic Conglomeration

  • ChokSheak Lau
  • Loi Nguyen
  • Sina Eghrari
  • Khoa Ho
  • Veena Kolanu

The Story...

This whole project milestones thing started with Milestone 1, an individual project to put together a SoundFileGroup that searches for music files on the hard disk and plays music files of these formats: MP3, WAV, MIDI, AIFF. From then on it's all group projects. Milestone 2 is to put together a Squeak-based JukeBox with functionalities from Milestone 1. Our full-blown Milestone 7 is supposed to be able to load/save playlists, and search for music files from both the disk and the web, specifically

So, for each of these Milestones, it's hours of programming in front of the PC. Kind of tough to get the web search thing finished.

The Hard Parts

In order to get the thing working together, we received a lot of help from the dear TAs, without whom there'll be some obstacles that are pretty tough to clear. Let's look at what we needed from the TAs and the professors:
  • SqueakHacked.exe, a modified version of Squeak 2.8 that allows Squeak to play MP3 files on MS Windows systems (P1)
  • Instructions for getting Squeak to play MP3 files and other file types (P1)
  • Some help on the newsgroups to get the PWS in Squeak to work (PWS is not the Personal Web Server by Microsoft!) (P4)
  • Instructions to play multiple files through the web browser (P4)
  • Tutorial stuff for parsing HTML files and requesting for files using HTTP request from the web (P6)
  • The Cookies changeset to prevent the websites from asking for your personal information every time you visit the site (P6)

Now, all these may seem doesn't look so hard now when you're reading them. But when you're to come out with a working Squeak program that is able to do all these fancy things, it would become kind of hard. Our brains (not the TAs') almost reached a deadlock when we were asked to play multiple files over the web-browser using Squeak and we were rather mystified by that time. But then the TAs managed to come up with about three different ways to play multiple files over the web: 1. meta refresh tag 2. multi-part MIME document 3. java applet. So the problem really wasn't as huge as we perceived it at first. :-)

The other parts that we as students faced and conquered were:
  • Using pluggable Squeak morphs to form the Squeak-based jukebox
  • Coming up with a good MVC (Model-View-Controller) design for both the Squeak- and Web-based jukeboxes
  • Learning how to use Squeak to serve webpages respond to embedded HTML Squeak code
  • Learning how to parse HTML documents and search for the URL at which the music file is located

It turns out that the demands of the Milestones, although hard to meet, are actually doable. The main difficulty from using the Squeak classes comes from the lack of available documentation for the Graphics User Interface functions, so we had to dig through the source code quite thoroughly to find out how to do something. ( of course, not to mention that the provided Squeak classes are not as intuitive as we like them to be )

Our Final Products

Let's look at the stuff we finally put together. The Squeak-based JukeBox for P4 and P7 (final milestone), the Web-based JukeBox for P7, and the UML diagram drawn using MS Word 2000 ... ...


You can click on this link for the full source code:

Main Considerations

Our team has spent a lot of time and effort on the UML design of the jukebox. In Milestone 3, we were to devise the UML design for up to Milestone 5, and we spent about 6 hours on the UML design. Afterwards, once we start coding in Milestone 4, we refined our design to make it more implementable, and that took us about 4 more hours. For Milestone 6 and 7, we were to integrate the web search functionalities into the jukebox, so we spent about another 6 hours on coming up with the new UML diagram, which is what is posted on this page. Although it is just a group of lines and text-boxes, it is not easy to come up with a truly Object Oriented Design for this jukebox, and we hope that those who get to view our UML diagram can learn something here.

Although we have taken great pains to come up with good designs, it is still not easy to follow the design to the letter when we are doing the actual coding. This is especially so when we need to coordinate the coding efforts of different team members, and it is hard to define exactly what we need from one another until the later milestones when we became more experienced. There is a tendency for us to add quick hacks to the code to crack bugs or implement new functionalities, but it all still turns out well finally. It works!

Some Statistics

I know some of you might wonder how much work is required to put together all this jukebox stuff. Here are some statistics that I can think of which you might like to know:
  • Code Size - Squeak Source: 98KB, HTML Source: 21KB, Documentation: 159KB, Total: 278KB
  • Total no of Classes - 19

Rough estimate of the amount of work needed
  • Milestone 1 - 15 man-hours (individual)
  • Milestone 2 - 15 man-hours (basic Squeak interface)
  • Milestone 3 - 10 man-hours (only documentation and design)
  • Milestone 4 - 50 man-hours (most time spent debugging the web-interface and music playing)
  • Milestone 5 - 40 man-hours (most time spent trying to use the select list in Squeak)
  • Milestone 6 - 60 man-hours (we spent so much time working that we lost track of time)
  • Milestone 7 - 10 man-hours (slight difference from Milestone 6)

Please note that these estimates are really very rough estimates, the actual number of hours that our team members spent might have been much more than the above-listed, but it is only for informative purposes. The work have been pretty tough, but we ended up learning a great deal in the course!

Hope you have enjoyed reading all these!
If you have any comments or questions, please feel free to email me at ( click here ).

Links to this Page

  • Cases last edited on 30 July 2011 at 2:33 am by
  • Steve Miller last edited on 28 July 2006 at 6:45 pm by