3 ms·
There are two times when you'll be better of programming in XML. One is if the language you would otherwise be writing in is Java. You would rather implement b
by Sandman 16y ago
There are two times when you'll be better of programming in XML. One is if the language you would otherwise be writing in is Java.
You would rather implement business logic in XML than in Java? Seriously?!
Personally, whenever I see logic implemented in a markup language, it makes me wanna scream. That's simply not what they were designed for.
As far as I'm concerned there's only one time when you're better of programming in XML and that's when doing GUIs. That's because XML lends itself naturally to GUI programming. Concepts of nodes, parents, children, siblings and trees are very much at place in XML (or XML-like language), and can be easily used to describe the structure of the UI, whereas in imperative programming there are really no such concepts, and you have to sort of 'invent' them.
I think that people are finally starting to realize this - that we shouldn't indiscriminately use XML for just about anything, and especially not for tasks that require some sort of decision, branching and logic.
But we should use it for what it's good at, and that's describing structure (of documents, user interfaces, models, etc).
The good people at Adobe, for example, came to this conclusion a couple of years ago, that's why when developing Flex applications you usually write your UI in MXML and your business logic in ActionScript.