Tom's Moblog

image

I just got a comment from Tom Conte who has launched his own Java-based moblog! Nice. He's using the Sony T300 to take pictures and email them via GPRS. That's awesome. I had seen that phone before, but I hadn't realized that it was a multimedia phone. Checking the specs, it's great - like a poor man's T68i. Erik was looking for a phone where he lives near seattle and there didn't seem to be any good ones, but actually there is the t300 at T-Mobile which is incredible. Even more incredible is the price - $150. That's very cool.

Here's the side bar from Tom's moblog.

I wrote this MobLog in a one-week coding frenzy in order to better use my new Sony Ericsson T300 MCA-25 camera phone while on vacation :-) I wanted to be able to blog directly from the phone and include pictures with the posts. The T300 makes it easy because you can send pictures directly by email over GPRS.

This MobLog is a small Java Webapp running on Tomcat, written using Struts. I wrote a Struts plug-in which runs a background thread; this thread checks a POP3 mailbox using the JavaMail API. I send the pictures from the T300 by email (as MIME attachments), with some text in the email body; the email is sent to a special mailbox on my server. The thread will pickup the messages, extract the picture attachment and post the whole thing to the blog. The posts are stored in an embedded HSQLDB database and there's also a JSP/Struts-based admin interface. The nice thing with this design is that everything (mail demon, database, etc.) is integrated in the Webapp, no need to configure anything else: deploy the WAR file and you're ready to go.

On the front end, the posts and all the Weblog info (title, etc.) are serialized into an XML document using Castor; the resulting doc looks more or less like a RSS 2.0 file (my goal is to tweak the Castor mapping so that it produces en exact RSS 2.0 doc, which would then become the main display format). An XSL Transformation is then applied to this XML doc to transform it into the HTML document which you are looking at (the doc uses some CSS from glish.com). It would be trivial to write some XSLT to transform the source doc to WML (for WAP devices) or another flavor of RSS.

Good stuff, Tom! I'm furiously trying to catch up right now...

-Russ

< Previous         Next >