[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Subtyping in XML
Many of the OO luminaries use encapsulation interchangeably with information hiding or link them closely. From the article you linked to I quote " * Cox'definition allows for encapsulation to reveal some information, for example full visibility to the procedures offered by object, while hiding some other information, for example no visibility to data. * Booch and Rambaugh make no distinction between information hiding and encapsulation. " I'll take the opinions of Brad Cox and Grady Booch over anyone who uses public member variables, C++ or arrays to argue points about OO. No offense to Berard, intended. The truth about software engineering is that most of the core tennets around it are based on opinions, conjectures and best practices. Moore's law, Mythical Man months and Extreme Programming are all just theories and opinions. Some opinions believe information hiding is akin to encapsulation while others believe it is merely grouping things together. The former makes sense to me with regards to what I believe is effective object oriented programming while the latter does not. Anyway this is rather offtopic for XML-DEV so email me offlist if you want to continue this discussion. -----Original Message----- From: Maciejewski, Thomas [mailto:Thomas.Maciejewski@l...] Sent: Tue 9/10/2002 11:12 AM To: Dare Obasanjo; Maciejewski, Thomas; Henry S. Thompson; Jeff Lowery Cc: paul@p...; Xml-Dev (E-mail) Subject: RE: Subtyping in XML I grabbed this snippet from:http://www.arcc.or.ke/ken_it1.htm and although the definition of encapsulation is closely linked to information hiding I am not sure if your argument that XML does not provide information hiding eliminates it entirely from being used in combination of the term OO. In any case here is a statement that at least throws a bit a vagueness on the definition of encapsulation: <quote> According to Berard [Ber93], if encapsulation were the same as information hiding, then one would argue that everything that was encapsulated was also hidden. This is not true. For example, even though information may be encapsulated within arrays the information is not hidden. Another example is the creation os some global data in C++ class public interface, the data is not hidden. </quote> so although XML doesn't hide data it seems that it can encapsulate and promote the reuse of object like elements ???? -----Original Message----- From: Dare Obasanjo [mailto:dareo@m...] Sent: Tuesday, September 10, 2002 1:48 PM To: Maciejewski, Thomas; Henry S. Thompson; Jeff Lowery Cc: paul@p...; Xml-Dev (E-mail) Subject: RE: Subtyping in XML I'm not sure what definition of encapsulation you are using. Encapsulation in OO is the seperation of an object's interface from it's internal data structures and implementation. All XML documents have is internal structure which have to be exposed to do anything with them. -----Original Message----- From: Maciejewski, Thomas [mailto:Thomas.Maciejewski@l...] Sent: Tue 9/10/2002 10:37 AM To: Dare Obasanjo; Henry S. Thompson; Jeff Lowery Cc: paul@p...; Xml-Dev (E-mail) Subject: RE: Subtyping in XML I think this may be because there seems to be a trend towards using XML in parallel with OO systems. ( serializing objects or to help bridge a relational data base and an objects ) As far as the Inheritance, Encapsulation, polymorphism argument : Inheritance - it has it Encapsulation - I think at least some elements are there polymorphism - I guess your point here is that there is no action so how could there be polymorphism ... but since there is a lack of action then maybe the polymorphism part of this definition is irrelevant? I definitely see XML at least aiding a good OO design ... picture a system of xml data that gets passed around a system of "strategy design pattern" type code that excepts this data in and is able to process what is needed and pass these "objects" on to something else. Doesn't soap also push towards this paradigm? and why would this not be OO or at least a part of the OO paradigm? While it may be arguable that XML is NOT OO I wouldn't get too upset when you hear OO in combination with XML unless you would like to see XML limited to non OO systems. In my opinion it this would be a major limitation. -----Original Message----- From: Dare Obasanjo [mailto:dareo@m...] Sent: Tuesday, September 10, 2002 1:20 PM To: Henry S. Thompson; Jeff Lowery Cc: paul@p...; Xml-Dev (E-mail) Subject: RE: Subtyping in XML Every time I read the words Object Oriented or the abbreviation OO in combination with XML, I cringe. Objects aren't XML and XML isn't objects. W3C XML Schema has some features inspired by OO but I wouldn't go as far as calling it OO in XML or even worse calling it an "Object Oriented schema language". The core tennets of OO are encapsulation, inheritance and polymorphism. W3C XML Schema gives us 1 of these, once the XQuery REC + F & O are done we'll get another. Encapsulation I doubt we'll ever see given the way the current family of technologies works. This is besides the fact that objects are about behavior not data while XML is the exact opposite. -----Original Message----- From: Henry S. Thompson [mailto:ht@c...] Sent: Tue 9/10/2002 10:08 AM To: Jeff Lowery Cc: 'paul@p...'; Xml-Dev (E-mail); Dare Obasanjo Subject: Re: Subtyping in XML > That's a bit of a strawman, IMHO. It may have been the intent of the WG to > produce OO in XML Not produce, but introduce, and I think you're both a little off-target wrt why type definition by restriction and extension are in the language. They're there in large part because the WG had a requirement to improve the managability of the process of syntactic constraint, by introducing 'inheritance' (read OO-design features) into the constraint language. Think of C --> C++ as a parallel, in so far as C++ took a number of OO design patterns generally acknowledged to be useful for maintaining large programs over time, which C developers had to implement using text-substitution-macros (i.e. #include), and moved them into the language. In introducing the tag-type distinction, derivation by restriction and extension, named element and attribute groups and substitution groups, the WG was very consciously trying to do the same thing, looking at existing 'best practise' wrt the use of parameter entities in large DTDs. You may or may not think we got it right, but that was the primary motivation. The possibility of a better impedence match between documents and application data was a collateral benefit (or not, _ad lib._). ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2002, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@c... URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|