OO Design question, XDocument
Posted on 2010-09-24
Please help me to understand the newer and possibly more modern programmers I am working with. I come from a SmallTalk / C++ background but I would like to think I know something about inheritance and c#.
We will be doing a lot of work with .Nets XDocument on a series of XML sources with very- very similar schemas.
So it is reasonable from my background to create a new name space and extend the XDocument class with functionality we will need. I think it is reasonable to create a more refined XDocument from the point of view of our needs. I favor a ‘Is-A’ design where the new class is integrated with our logging and other proprietary behaviors. Furthermore containing methods that we need over and over again.
The true .NET recently college trained programmers strongly object. They advocate a ‘Has-A’ design with other classes that accept enumerators of type XDocument to do the type of refinements necessary.
I value your opinion. Thank you for your time and consideration.
public class XDocumentFR : XDocument , IDisposable
static XElement CloneElement(XElement element)
public string ValueAsTextFromElement(XElement rootElement, string xPath)
public void Load(xmlSourceType eXmlSource, string xmlSourceValue)