Major Refactoring

Written for BeatBox by Scott Ringwelski on 2012-09-20

For a couple of weeks now, I've been working on a (much needed) refactoring of BeatBox. BeatBox started as a small project and over time grew bigger than it ever meant to be, and this lead to pretty sloppy code that needed to be cleaned up. Lots of changes will not be noticed externally, but internally the following has changed:

*Better separation of code.
*Code is now split up into the core and beatbox itself. The core is like the API/Beans. It contains interfaces and simple beans (objects) that plugins can use. Beatbox itself provides implementations for these interfaces and beans. The major interfaces on the BeatBox app object are:

plugins
library
playlists
podcast
database
window
files
operations
playback
covers
actions
icons
info
settings
devices

These interfaces are ready to be used - BeatBox itself already uses them and so are already well tested.

*Plugins are now supported. Plugins have access to any of the above interfaces, plus a few more.
*Better multi-library management. Libraries (Music library, Podcast library) are now fully broken up (each points to there own folders, import media differently, etc.). Adding new libraries is easy and even plugins can do it.
*Automatic database upgrades. Users no longer have to wipe their database because of a schema change.
*Operations, playback, covers, icons, and devices interface are new interfaces that focus on one part of the overall app and do it well.
*The info interface, which is also new, is of particular interest. The info interface lets plugins aggregate data to contribute to BeatBox's info database. For example, someone might write a plugin to query 'songmeanings.com' to contribute to track data. That data is then made available for other plugins to use. One area that it is already used is the Song Info view. Plugins can add sections to that view (based on the current media's media type (song, podcast, audiobook)) using the info provided by other plugins.
*Many, many more changes

Unfortunately, with all these big changes come regressions. Any regressions you may find should be reported as a bug.

I hope to have the PPA updated soon.

Read all announcements