Programming for the 21st century - o:XML

Jeff Davies: The move to an XML Programming Language is a precursor to a new generation of cheaper, high-quality, bloat-free software

Some years ago, I had an idea about an XML programming language, and made a DTD and XSL to convert the program in XML to Java through transformation via XSLT.

Like all good ideas, I was by far and away only one of many with the same idea (having searched sourceforge for similar projects). At the time, I made contact with Martin Klang, who had made far more progress on a project with the same idea.

Time passed and I lost the files, but recently I recreated them and made a sourceforge project. Then, out of the blue, an email arrived from Martin Klang announcing the availability of ObjectBox 1.0. This is currently closed-source licence, but he's going to release the next version under GPL or similar licence.

Whereas I and many others had sat on our hands with our ideas, Martin had been working away, and actually developed a working product. It is currently limited to Servlet type applications, but there is no reason why (for example) the Linux Kernel can't be written in XML.

See to download ObjectBox or look at object oriented XML programming language (o-xml) specification.

O:XML is actually great for Servlets since XML and HTML can be more easily embedded in the code than say Perl, cgibin, or PHP by virtue of the fact you can use a full XML Editor like XMLSpy to edit the code.


Many people might at this stage be thinking in terms of editing raw XML in Emacs... er no. Although possible, you'd have to be mad to want to do this. There are many excellent XML Editors out there. For programming you most definitely would want a tree view XML editor.

Imagine the root of your tree is the Class, below this leaf nodes for Member Functions and below them a leaf node for a For-loop. Expanding the leaf node displays all the steps in the for-loop.

Immediately any problem (I've seen a few times in commercial apps) where braces are miscalculated and wanted chunks of functionality left out, or unwanted chunks of functionality left in, is removed by the means of editing.

More importantly than this, you can use the whole ethos as a means to enforce Extreme Programming, or even the traditional model of functional specification through coding through test case design.

Traditionally there is a big big task keeping functional specifications and the code aligned (let alone test data). If you edit both AT THE SAME TIME, this task will be easier.

In other words, the functional specification with Audit points are written in XML (call this the 'story' for how a procedure works for Extreme Programming), and the code is also written in XML. Both are in the same document, as is unit test data. Imagine checkboxes presented by a plugin to the XML editor (Functional Spec, Code, Unit Test Data).

Obviously auditing the code will then be a far simpler matter, so Auditing (and Quality) will get cheaper. The use of Design Patterns would also be trivial to implement in the technology.

Zooming out to a forest level so we can see the difference at a more contextual level: Complex C++ and Java Parsers are replaced by far Simpler XML Parsers.

As XML Parsers are comparatively easy to implement and use, editors have the same parser in them, and therefore can display the hierarchical structure of the program in a tree format easily. Note: such is the nature of XML and the tools that from a given bit of code in XML, you could easily produce C or Java source code, or indeed, Assembler, or through a more custom SAX based parser, even a Machine code generating Transformation tool.

The simplicity and plugability of the overall solution makes it easy to add management layers to the code (like auditing, like integration of functional specification). The move to XML should also make searching for similar blocks of code simpler. This means you can refactor using XP more easily: making sure there are not multiple bits of code doing the same thing in many places, the intention of course to reduce software maintenance costs.

Therefore, I see the move to an XML Programming Language as a precursor to a new generation of cheaper, high-quality, bloat-free software.

Jeff Davies obtained his masters degree in Electronics in 1989. He started writing programs to automate scientific experiments (real time graph type programs, Microsoft C, VB, QuickBasic) at a UK government funded site. He became Lotus Certified Developer writing CRM systems, Internet Content Management, Document Management and other Business Automation software in Lotus Notes (Lotusscript and Microsoft Visual C++, SGML).

ZDNet UK's Developer News Section delivers the latest headlines together with the best UK jobs, right to your browser.

Let the editors know what you think in the Mailroom.


You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
See All
See All