Simon Fell > Its just code > Extensibility
Sunday, April 13, 2003
Dare and Sam continue to argue that an XML based interface is better than an interface based on .NET interfaces. I'm not seeing why. Yes, with XML you can add new elements without changing the CLR interface, and do runtime checks for if the element exists or not. How is this different from having the rssItemObject implement multiple interfaces ? and having the plug-in attempt to cast the IBlogThis to the different interfaces it understands (QueryInterface for the COM heads)
namespace Dare.Extensions
{
interface IBandit
{
string language { get ; }
}
}
namespace RssBandit
{
class rssItem : Syndication.Extensibility.IBlogTHis, Dare.Extensions.IBandit
{
...
}
}
Dare says "I have a choice between being ghetto and coming up with an IWeblogItem2 ..." but how is that any more ghetto than adding {http://dare.extensions}language to the rss fragment and having the plug-in check for its existence ?
So, I'm still not seeing why one is fundamentally better than the other, however having said that, I'm likely to stay with the XML based version because at some point, someone will write an aggregator that preserves the original XML and will be able to pass that through to the plug-in. At that point, the plug-in can handle extensions to RSS without the aggregator specifically supporting it.