Why You Should Quit Worrying, and Learn to Love XML

I am an analyst with a problem. Well, I actually have a number of problems, but there is a particular one I want to write about right now. The problem is this: I am working on a rather large project which makes heavy use of XML and XSLT, and we can not find developers who are comfortable with the technology. I’m not saying that we do not have anyone competent, nor am I on a fishing expedition for another developer (so don’t ask). What I am saying is that, as we have interviewed developers for various positions, I’ve seen a surprising lack of experience with or even knowledge of essential XML technologies. Even with the developers we currently have, I’m seeing a lack of comfort with the tools.

I have to admit, this is a surprise to me, and I have found myself wondering why this should be the case. After all, the essential features of XML are not that hard to learn. Granted, the syntax of some of the technologies in the XML alphabet soup can be a bit daunting; but the power you get in return can be very great. Moreover, this technology is all over the place. It seems that just about every software package supports XML in some fashion, and several are starting to embrace things like XPath, XSLT, XSD, and even XQuery. So, why the lack of knowledge and experience? Well, I do not think I can say, but maybe it is simply that they do not know what they are missing.

So, here it is—an exhortation to coders everywhere—learn this stuff, and learn it now. You need it!

What’s So Special About XML?

Well, to start with, XML is everywhere now. Just about everything out there now can use it to some extent or other. Word processors can edit it. Databases can generate it, query it, and use it for updates. Applications use it for configuration. Systems use it to exchange data. It is the lingua franca of the modern Internet.

Combine this ubiquity with the fact that you can do things with XML quite apart from any particular application, and you get something very powerful indeed. What do I mean by “do?” The different XML technologies let you take your static XML data and work with it in various ways: XPath lets you find particular nodes in a document, XSLT lets you alter and XML document (more on that later), and XQuery lets you treat your XML document like a database.

What this means is that, if you have an XML document and a knowledge of the tools, there are a broad range of things you can do with your data:

  • You can convert from one XML format to another (this is handy for application integration—getting two applications to talk to each other).
  • You can convert your XML document into an HTML document (this can be handy for web applications).
  • You can ask questions of your XML document—how many nodes of a given type do you have, what’s the value of the X node, etc.

XML and its allied technologies combine to give you a relatively simple, flexible tool that can do a lot with a lot of different classes of data. Basically, it is the Swiss army knife of the information world. Who wouldn’t want that?

How Can This Help You?

Yes, XML is everywhere, and you can do stuff with it—so what? How can knowing XML, XSLT, and all the rest really help you in the end? Simply put, spending a little time and effort now to learn how to use XML will pay big dividends to you later (and not much later at that). Not only will you be able to work on projects requiring these skills (and you will see more and more of them as time goes on), that much is obvious. Beyond that, though, you can apply this knowledge in many of the day-to-day tasks you do… quite apart from development. Some examples from my life:

  • I’ve used XML and XSLT in many web applications as an intermediate layer between the business logic and the display logic. These are simple and straightforward applications of the technology—nothing earth shattering. The payoff had been great, however. In those applications, it has been much easier to tweak the UI to match the customer needs than in those applications where traditional coding was used for the whole thing. Also, it has been easier to reuse that data for other purposes (for instance, pulling the data out of the application for use on a portal).
  • I’ve recently started using XML and XSLT as a basis for mockups and prototypes to work through design issues with the rest of my team and our stakeholders. Rather than just throwing together a static web page or a graphic prototype, I mockup some data in XML and then build up the UI using XSLT. I’ve even used XSLT to mockup some of the business logic, believe it or not. The end result is a mockup people can actually play with, that illustrates more than just the look or even flow of the application. And it is so easy. I can throw something together very quickly, let people play with it, and then tweak the prototype using their feedback. So, with this, I get rapid prototyping with minimal effort. More personally, this kind of has gotten me a reputation at work as someone who can turn stuff around quickly and can really contribute to the project.
  • Another way I use this stuff to my advantage is to help with the kind of day-to-day analysis I frequently have to do. As one particular example, I use XML to store requirements. I can use XSLT to format the requirements into a form everyone can read. I can also use XSLT, however, to extract information about the requirements to answer questions: how many requirements do we have, how many business rules, what capabilities aren’t covered yet? By using XML and XSLT for this, it is very easy for me to keep things organized, to produce a clean and consistent document, as well as to be able to answer quickly the typical sorts of questions I get from my management (without having to do the work manually). Again, I get a reputation for being someone who delivers, and I get that reputation without having to stay late tallying up hundreds of rules or manually adjusting a spreadsheet.

Summing Up

XML and XSLT are really very simple tools to learn how to use, and they will pay you back for the effort many times over. You can build more flexible applications more easily, sure; but you can also use it to make other tasks in your day go faster. Like a Swiss army knife, XML and XSLT give you a lot of flexibility to solve a wide array of problems, and it is convenient.

So, if you haven’t already, take a little time out of your day to learn how to use XML, XSLT, and some of the other bits of the XML alphabet soup. Play with it a little, and see how you can apply it to your work. You’ll be amply rewarded for the effort.

This entry was posted in Analyst's Life, Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>