Postmaster Meets XML-RPC

Skip this if you care nothing for technology-speak. There’s nothing in this post that you will find of the slightest interest.

Now that we’re rid of the riff-raff: Postmaster has seen several interesting changes recently, a shift in methodology, actually, worthy of mention here.

The Initial Problem:

Many existing weblog systems lack the ease-of-use editing features found in most word processors. Think buttons to make text bold or italics (and matching shortcut control keys). Buttons to insert links, images. Simple things you take for granted elsewhere, but are found lacking in traditional web interfaces.

Solution #1:

Use DHTML to create the buttons and control-key sequences, JavaScript alerts to deal with user issues. Jason uses this technique to enhance his comments section.

Solution #1’s Downfall

DHTML (think JavaScript + CSS, really) doesn’t work the same in every browser. It fails completely in others. And then there’s the cross-platform issues to contend with.

Create a Java applet. You’ll have absolute control over the look and feel, the responsiveness, the featureset. It’ll be much harder to develop, but now Postmaster will run anywhere Java will (and that’s just about everywhere). Plus, you’ll be able to reuse your new components when you roll-out the actual Postmaster desktop app.

Solution #2’s Downfall

In the same way that DHTML is neither predictable nor cross platform, neither is the way a browser uses JavaScript to interact with an Applet (of course not: JavaScript anything but compliant).

Unfortunately, calling a Java Applet’s methods in a browser is only possibly using JavaScript. So how will you get data from the Applet into the form so you can submit it to the controller servlet?

The Answer:

Use XML-RPC. Make the applet speak to the servlet directly. Cut out the middle-man. The server receives the XML-RPC data, responds to it, and returns a response. The Applet responds by redirecting the browser to a dynamic response page.

Those of you nodding your head knowingly, go pat yourself on the back, rearrange your pocket protectors, set your protractors, and treat yourself to another Pop-Tart. The rest of you, rejoice in the improvement of an application you will soon enjoy.