Sunday, October 26, 2008

Taking site backup... to the desktop!

Lately I have sporadically "leaked out" some of my thoughts on JoomlaPack's future and features I am working on lately. One particular feature, is providing XMLRPC services. Why is it so important, you might wonder? Well, let's see what XMLRPC is all about.

Most people have published on a blog using a desktop application, be it ScribeFire, Windows Live Writer, w.bloggar, etc. The common feature of all these tools is that you are writing your article off-line and when you're ready you can publish it on your blog. The magic behind the scenes is XMLRPC. This buzzword really means that the client (your blogging software) sends a chunk of XML data to the server (your blog). This is specially formatted so that the server understands it has to perform an action (in this case, post an article). When it's done, it sends a response in XML format back to the client. The client processes it and tells you that your article is posted.

It wouldn't be so much of a deal if it weren't for the XML format itself. It is generic enough to cater for every use imagineable, but it's also very robust that it can be very well described. It is analogous to paper in written communication. While it does not provide the language, it provides the medium on which the language can be carried between the two parties involved. The choice of language (and the interpretation of the messages) is left to the two parties. But it's really cool to know that the message will always be written on paper, neither on stone, nor on papyrous.

Joomla! 1.5.x has two built-in XMLRPC plugins for posting articles. The first is the Joomla! XMLRPC services plugin and the other one is the Blogger API XMLRPC services. This way you can use an off-line blogging tool with Joomla!. In fact, it's the best way to have a newbie post articles in a Joomla! site, because it carries virtually no risk of messing up settings.

This is all very cool, but you are probably wondering where does JoomlaPack fit in? What does this article posting thing got to do with site backups? Well, remember when I said XMLRPC is very generic? It is so generic it can be used any time you want to tell the server to do something and inform you on the outcome. For example, we could tell the server to load JoomlaPack's engine (CUBE), starting a backup and returning us backup status information. In fact, this allows us to control the backup process from any networked device as long as it can connect to our site's server.

The missing piece of the solution is the client part. Ideally, a client would run on any operating system (cross-platform) and be able to backup any site on which JoomlaPack runs. It should even grab a local copy of the backup archive for safekeeping. This piece of software would truly take site backup to the desktop!

Today, in SVN revision 313 (notably, this revision number is the same as Donald Duck's car registration number - I'm a lifetime fan of Donald :D - and has a number of notable properties ), I have commited the first part of the solution, the XMLRPC services plugin. I will now start writing the desktop application in Lazarus, a cross-platform programming environment similar to Delphi. My expectation is that this will be stable somewhere in mid-Q1 2009.

Stay tuned. JoomlaPack is about to redefine site backup.