Posts Tagged 'XML'

SourceFactor – no compromise

You could skip the best part of this article and visit sourcefactor.org – SourceFactor is an interface for processing arbitrary sources to arbitrary targets (no, really), and it comes with a nifty utility class that helps formatting the output. You can use it with build processes or you can integrate it with java.

I wrote somewhere that languages are inextensible; inextensible they are. For proof:

  • C and C++ macros.
  • Java annotations

Macros are simple and potentially messy. Java isn’t messy. Instead Java provides a pretty scary API for preprocessing. Because I annotate all my source with XML, I wasn’t impressed when annotations came by, and after a while I just sat there, shaking my head – after all the idea of annotations is to save time on the so-called ‘boiler plate’ required by some APIs and frameworks.

That language designers provide patchy facilities to allow writing shortcuts shows just how far you can go with regular inheritance and re-usability constructs. The idea of writing domain specific languages isn’t new (check Persistence of Vision for some entertainment), and although it’s not for everybody, there are many, many advantages (Wikipedia has a decent article on ‘Language Oriented Programming’).

Yes, XML’s my cup of tea. One of the disadvantages of writing a domain specific language is that you need a parser. writing a parser is an expensive black art. Leaving elegance behind and hitting the ground running, XML parses anytime, anywhere.
Ergo one of my favorite pass-times is embedding regular java, ECMA-Script or PHP within XML declarations and exporting regular source code.

SourceFactor doesn’t bind you to XML sources. Nor does it tell you how to parse your input. But say you took on the challenge to write a simple, readable formal specification using a plain text editor, spreadsheet software or whatever you please. Well then, SourceFactor gives you a simple API that you can use to invoke your preprocessor from the command line. It is free, small, open source and convenient.

If a language were a violin, meta-programming is playing without brushing the strings. Another day I’ll write about naive parsers and how hubris, upon the world unleashed, millions of write only code-lines.

ee-xml

I setup a project for the ee-xml source editor at xp-dev.com.
Release date: 01/08/2009

ee-xml will benefit 5 years of expertise in designing XML driven development solutions and will eventually replace Antegram for Java and Antegram for Web. Compared to Antegram, ee-xml will benefit direct support for arbitrary XML data, implicit XML subset definition and enforcement and per-element user actions and constructors.

To track this project, get yourself an account with xp-dev and request read permission by replying to this post, quoting your user name.

Why another XML editor

Existing XML editors target the following applications:

  • WYSIWYG – (mainly) technical documentations using XML/XSLT
  • UML
  • Schemas
  • XML data files

While existing solutions may be fairly suitable for the above tasks, we are nowhere near to the ergonomics required to edit and navigate megabytes worth of user generated data scattered across interconnected XML files quickly and efficiently. This is our part.

Essentially, ee-xml will compete with regular IDEs as a software development solution:

  1. ee-xml will support development using OSM – develop for Java, C++ and other object oriented idioms while benefiting the control offered by XML driven specifications without the hassle of plain text XML
  2. ee-xml will provide a one step solution to specifying applications while generating an underlying specification model. This programming technique works around the limitations of traditional languages and provides an attractive alternative to aspect programming (I’ll write about that) while allowing technically minded users to modify applications themselves.
  3. ee-xml will be cross-platform and extensible.
  4. Programming languages are, mostly, inextensible (I’ll explain, promise). XML isn’t. Inextensible means programming needn’t be fun, or profitable. Programming needs to change or I’ll change my job.

Contribute

To contribute, it’s OK to just reply to this post for now. At this stage, we are especially looking for project customers – if you have ideas about what an XML editor for programmers could do for you, then you are a potential contributor.

I recommend potential contributors have a look at Antegram for Web as this prefigures ee-xml and will allow your barking up the right tree.

In a couple of weeks, the project should be ready for developer contributions.

Visual XML editors?

I’ve been hunting online for an XML editor with the following features:

  • non overlapping tree views
  • tabulated attribute lists
  • custom actions.

If you had a look at my IDE, Antegram, you will know where I’m coming from: I use non overlapping tree views everyday in my code. To cut a long story short, I’m out of luck as I didn’t find what I was looking for. OK, I admit I’m quite particular about this – I’ll explain another time.

For a quick, unfair overview of what’s around and what it could do for you, read on…

Roughly, the offer is divided between WYSIWYG editors and rational editors. WYSIWYG editors are typically based on XSLT, and that seems powerful and exciting (although I am not quite addicted to XSLT). Skimming through my list I feel that at least 2 or 3 of the editors I found may support custom actions. Rational editors typically offer a wide range of visual tools including a tree view; unfortunately it doesn’t seem that any editor was built around several non overlapping tree view.

Here’s the list anyway:

Open XML Editor
XMLmind
EditiX
My Eclipse
Altova
oXygen
Foxe
Exchanger
XML Notepad
Serna
XMLSpy
Stylus Studio

I also found a few resources that may help in choosing an XML editor:



Follow

Get every new post delivered to your Inbox.