RTF or WordML for Office solutions?
John Durant has an interesting post talking about RTF or WordML for Office solutions?
John's main point is that its easier to generate WordML on the server than it is RTF. As a Document-centeric kind of guy, my first reaction was "its really a function of the complexity of document involved."
Just to be safe, I decided to take a look at an exmple in our "real world." For example, I'm changed with maintaining an ASP.NET application that generates Safety Guides on the server. We use RTF largely because its what was available to us at the time. So this morning I decide to look into what it would take to rewrite that to use WordML instead. I'd love to say that I concluded that redoing that to output WordML instead of RTF would be hard enough that the best solution going forward is to would be to stick with RTF.
I can't. The WordML format for these documents seems both cleaner to generate programatically and to serve up efficiently.
What is going to be hard (maybe) is changing how we do it. Instead of just building up a big string of data and literally writing both the data and the markup, maybe its time to invest in writing my our own version of a streaming writter that would construct valid WordML on the fily. I'm sure that sounds easier that it is, but I can see all kinds of places where we would use it. In short, what I need is WordMLTextWritter that's a decendent of XmlTextWriter. Now if somebody has already written that, my life really would be simple!
John's does make assertion that doesn't quite jive with me though: That is XML is a better choice because it has more mind share than RTF. I'm not sure that I completely agree. While that's true the closer you get to the cutting edge, there's lots of cases where RTF is still the defacto standard because "its what we've always done. Its not broken."
If that were really true, we'd still be riding horses.