Friday, 2 July 2004

Experimenting with XML-backed entries in blojsom

« blojsom/OS X Tiger Server Day 3 | Main | blojsom/OS X Tiger Server Day 5 »
As a placeholder for things I want to look at in the future or simply to experiment with for various purposes, I created "The Lab" on our wiki. The first experiment is pretty much a success. I give you XStream testing.

I wanted to demonstrate an implementation for the BlojsomFetcher interface that did not use the blosxom-style format. The code you'll find on that page uses XStream. XStream is "a simple library to serialize objects to XML and back again." It couldn't be easier.

All in all, what did this tell me?

  • I can re-use code! I believe there were less than 30 lines of code added to create the XStreamBlogEntry and XStreamFetcher with changes to the comment and trackback plugins.
  • I did not convert the edit blog entires plugin which is used in web administration to allow you to delete comments and/or trackbacks for entries. That still deletes individual comments and trackbacks in the comments/trackback directories. Simple change.
  • XStream is a hell of a lot easier than manipulating a DOM tree. If you look at the code, the actual reading and writing of the object from/to XML is 3 lines of code. That's 6 lines of code. Are you kidding me?
  • Although not a deviation from using the filesystem as the content database, it's another format for the entries themselves ... and it worked.
Well, thanks for reading. Kudos to the XStream guys for a simple library that works as advertised.
Posted by david at 2:42 PM in blojsom ... all blojsom

 

[Trackback URL for this entry]

Your comment:

(not displayed)
 
 
 

Live Comment Preview:

 
« First  « Prev   1 2 3 4 5   Next »  Last »
« July »
SunMonTueWedThuFriSat
    123
45678910
11121314151617
18192021222324
25262728293031