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? The same question holds true for Office developers who create their own add-ins and customizations.
For my own part, I like to advance the declarative model in a lot of situations. We use for things like Research Services in Office 2003 with really great results. We also use for Smart Tag lists in Office 2002 and Office 2003 with great success.
The core OM is just that- the core OM. We can't imagine Word without Application.Documents.Document as the OM hierarchy. It makes sense as does Application.Workbook.Worksheet in Excel. We are comfortable with the convention. We know what to expect. But, what about a more niche-oriented feature? Rather than expose some functionality via the OM, there are advantages to using declarative XML.
First, it is schema based. Developers learn the schema, and they are off and running. They can use their favorite XML tools to get the job done. New tools and utilities can spring up in the community or be developed by ISVs to enhance the dev experience. This also happens for OM development, but not as easily. The declarative approach lends itself to a more open architecture in the long run. One key scenario is the dynamic generation of the XML at runtime. So, based on certain conditions, the XML file gets created and then imported programmatically (via the OM!) by the app. The app then behaves according to what the XML file contained. This is really slick model, because the XML can be created asynchronously, even if the target app is not even running (or not yet installed).
Let me know your thoughts on the question. I am doing some planning, so I am curious to know what you think.
Rock Thought for the Day: You must check out this list of the 101 lamest pop songs of all time. I'm a Johnny Cash fan, but he earned #67 in this list. It's hard to argue with most of them, but the list should be a little longer to make room for more song by Creed, No Doubt, Michael Jackson, and Nancy Sinatra. William Hung's version of "She bangs" (which I detest) is better than Ricky Martin's. How sad.
Rock On