Is XML Best Unstructured?
While XML can be used in an unstructured form I don’t believe it was simply intended to be an HTTP acceptable form of serialization. I believe I misrepresented XML yesterday tightly associating it with SOAP as a mechanism for communicating and transferring data. It can do that, but that was more of an implementation of what was already the capability of XML applying it to a specific need rather than the other way around.
Loosely coupled software is the nirvana of software developers wishing to write software that lasts for a long period of time while constantly being modified and morphed into ideas and features never imagined when the first code is written. The more one piece of software knows about another piece, the more tightly coupled that software becomes.
Interfaces are great tools for loosely coupling software, which I have covered from time to time when reviewing things such as SOLID development principles. If two pieces of software share a common interface (contract) then they can interact with each other handily because of the commonality of that interface. It doesn’t matter how that interface is finally implemented, or if it even operates on the same kind of hardware or operating system. If both sides support the contract, and the components can communicate, then the interface works. That’s why you can use a JDBC database driver running on a Sun machine to connect to an SQL Server database running under windows. They have a common contract of the communication interface.
Taking the XSD away from SOAP you are taking away the cross platform contract (interface) capable of operating in a mulit-hybrid environment. The SOAP specification combined with XSD define the capabilities of the web service, and combined with XML also strongly type the data being transmitted or exchanged.
So, perhaps a better comparison of XML without XSD would not be the Visual Basic Variant data type as I suggested yesterday; a better comparison would be to writing tightly coupled software by instantiating objects instead of interfaces.
The moral of the story is that XML is so much more than a tool for serialization. That’s my thought process at this point anyway. I’m sure many take a different attitude when it comes to XML, and even JSON, as some have commented already. Why not share your thoughts on the matter by writing btaylor@sswug.org.
Cheers,
Ben
$$SWYNK$$
Featured White Paper(s)
Top 10 Tips for Optimizing SQL Server Performance
read more)