Microsoft Office Development - Object Models or Declarative XML (Revisited)
Back in August, John Durant posted on the topic of Object Models or Declarative XML. For years, Microsoft and developer gurus have been telling us of the importance of XML. TechEd 2000 in particular seems to stick out as the first conference I attended that I remember being bombarded with XML related content. Back then, while I could see how XML could be valuable to some development chores, for the typical MS Office related projects I was doing, it just wasn’t something that I needed.
Declarative XML and Office 2003
With the release of Office 2003, XML assumed a whole new level of importance to me from an Office development perspective. Unless you’re using VSTO 2005, if you want to create solutions that take advantage of any of the new UI features of Office 2003 (Research Services, Smart Documents, and Smart Tags) you have to get your feet wet and craft XML files that specify the metadata required to implement the desired functionality. This is known as declarative XML.
Declarative XML and Office 12?
Reading Erika Ehrli’s September 14 post, it seems as though this trend is going to continue in Office 12 when it comes to Ribbon extensibility. Erika is the site manager for the Office Developer Center on MSDN. She writes:
Office "12" has a new look for client applications that replaces menus and toolbars with a Ribbon UI that organizes buttons, galleries, menus, and toolbars into tabs organized by categories. If you created special toolbars and CommandBars, the UI displays a special tab for your custom functionality. You can also extend the Ribbon UI by creating COM or managed Add-Ins or by using a text-based XML markup definition to create and customize the UI.
Also, check out Brian Jones’ post from December 2 that includes a sample document saved to the Office XML format. Spend 10 minutes examining the structure of this sample file and it’ll be clear that becoming comfortable with declarative XML is a requirement for anyone interested in “new-school” Office development.
Anyway, that brings me back to a question in John Durant’s post:
As enhancements are made to the programmability story of a core product like Word, Excel, Outlook, PowerPoint, Visual Studio, etc., there is a fundamental question: should enhancements be made via the OM or should they be made via an XML schema?
Is it true that everything old becomes new again?
In a nutshell, my thought on this is that while I can see the value of using declarative XML, the development experience using this method, well, “feels old-school” might be a nice way of saying it. On the flip side, as John mentions, there are lots of opportunities for the community of ISV’s to enhance the development experience through tools. Without any tools though, I’m reminded of the Excel/VBA development experience back in Excel 5.0 or Excel 95 (back when Office developers had to memorize the object model verbatim). Yes – Intellisense has spoiled me. I’d be a good case study for Charles Petzold (http://charlespetzold.com/etc/DoesVisualStudioRotTheMind.html).
Is it possible to have our cake and eat it too?