«« When is a Feature "Complete"? jid3rL Wrapped in SimpleTag2 »»
blog header image
Two Tiered Approach for a Library

Implementing the id3v2 spec has been a lot more fun than I thought it would be. Yes, truly geeky fun ... but fun nonetheless. I'd really like to implement the whole spec, and I don't think it would be that difficult.

(You can download jid3rL, a Java implementation of id3v2 in progress or take a look at the feature checklist)

The only problem with implementing the whole id3v2 spec is that it's about three times more than the average programmer really needs/wants to read and write id3v2 tags. Most of the id3v2 libraries I've seen are far from complete, most only reading and writing the basic tags: Text Information, Comments and maybe Attached Picture and a few others.

The applications that use id3v2 are equally simplistic with it. WinAmp and iTunes, two of the more popular MP3 players use only the most basic frame types for their tags.

So the API for a library that implements the complete spec might be a bit much for general use. It might be more useful to have a simplified API built on top of the main library that exposes much less functionality. Even better would be a library which exposes a simpler API but allows the library user to go into the more complex API if they need to.

This idea for this came from JFace, a Java GUI toolkit library built on top of SWT. JFace uses SWT to create an easier to use API for common SWT widgets, like wrapping an SWT Table with a JFace TableViewer. This saves JFace/SWT library users a lot of setup work and exposes easier to manipulate object models. Also, while using JFace, you can still get access to the underlying SWT objects to read and manipulate them.

Completely hiding complex details in a simplified API sounds like it would be much easier for me than allowing the user to dig deeper, though it may not be. If course the programmer would also have the option of just using the more complex API as well. I haven't given much thought on the specific implementation details, I'm just trying to empathize with the users of this library and what they'd want/need from it. Thoughts?

Posted at August 16, 2004 at 10:06 AM EST
Last updated August 16, 2004 at 10:06 AM EST
Comments

Any way that you can ramp up someone on a piece of sw by dropping out (hardly used) complexity is a good thing. Focus on the 80% of the API that people will use.

I think that if you do that, but leave room for "power users" to tweak more, you will have a successful lib. (as long as it is visible enough, but that's another topic all together)

» Posted by: Jim at August 16, 2004 02:19 PM
Google
 
Search scope: Web ryanlowe.ca