Pachyderm Asset Management


I've just worked up a drop-dead simple asset metadata database for the Pachyderm project. It's just a MySQL database, with a single table that has 10 fields (including primary key). This simple database will serve basic metadata needs for the Pachyderm beta.

I also built a simple asset management system to test out the database. I decided to do a lightweight PHP "application" to stretch my legs in a non-WebObjects non-Java environment. This is about as far from the elegant Model View Controller design pattern as it gets. Raw SQL is littered throughout the PHP code. But, you know what? It works. And is unbelievably simple to debug.

I'm thinking a version of this PHP asset management app, running on top of a simple asset metadata database, may form a valuable Small Piece, patterned after del.icio.us, but giving us the ability to extend for our purposes.

My previous thinking about metadata storage was stuck in the conventional "hardened", enterprise-class thinking that only storing an IEEE LOM would satisfy. Bollocks. This simple metadata database will gladly be coerced to spit out IEEE LOM records on demand, or Dublin Core, or whatever else is required.

There's a meme going around that says something like "the best solution is the absolute simplest thing that could possibly work" (I've heard it in a couple ITConversations sessions, and on a couple blogs - I'll have to track down who started it...) This solution is in that vein, and it's really striking a cord with me.

Give it a shot, if you like. But, be gentle, since it's my first real PHP work, and was cobbled together with the help of my on-demand guidance system. (oh, and I know it looks like crap - I haven't even started thinking about UI for it)

UPDATE: I've been slowly working on the asset manager test app when I get the chance. It strikes me just how simple it is to build. With the use of includes, it should be entirely possible to approach nice OOP design, although it won't be all MVC. But, if it's this simple to do, maybe you don't need MVC... I added file upload and MIME type recording in maybe 15 minutes, including the google-time to figure out what to do. I'm really enjoying PHP as a language - having some flashbacks to Lingo. The power of small pieces...

UPDATE: As I'm adding/tweaking stuff in this simple asset manager, I've realized that it is probably only a week or 2 of effort away from replicating the functionality of CAREO. I could use simple stylesheet switching to replace the "themes" in CAREO. All that is really left to add is authentication, activity tracking, RSS views, and a few other types of queries. But, as a few simple PHP scripts (currently maybe a total of 100 lines of code spread over a handful of files) instead of large java frameworks and applications, it should be much easier for others to extend and adapt for their needs... I do realize that my current attempt at PHP code is rather inelegant, but I'm hoping to follow some of the patterns and techniques used in WordPress to keep it clean, modular, and extensible.

Yet Another UPDATE: I've updated the asset database to store the full Dublin Core set of elements, so it should serve as a pretty solid foundation for any asset management use... I'll try porting the Teaching Resources Database over to it to see how it goes... Using an XML database is overkill for that anyway, and if I use the asset manager, I get to throw in the add/edit functionality for free (something that's on my plate for Teaching Resources anyway, so if I can just re-use this code, I'm further ahead already).


See Also