At the root of your question lies the real challenge: determining whether XML is an appropriate solution for your situation. XML is the industry buzz of the moment, and companies are using it for everything from modeling business processes to building WEB pages. But most important companies are using it for a data-transfer format so that applications can leverage XMLÆs simplicity, flexibility, and extensibility. Here are some guide lines that will help you decide whether XML is appropriate for your application.
If your application requires moving data between enterprises, XML is a good solution. XML lets you send data across the Internet and through firewalls by using the standard HTTP protocol. XML is also a good choice if your application needs to move data between hardware or software platforms (OSs). XML is not machine- or OS-specific. Finally, XML is a good choice if you simply want to ensure that your application or data source is robust even if the data schema changes. XML enables your application to be extensible because you access the XML-formatted data by using element and attribute names instead of offsets, which structured programming languages use. Note that using element and attribute names to access data XML is similar to accessing fields by name in a SQL server table. If you have one or more of these application requirements then XML is a good solution for you.
Next you need to decide the best place to generate or consume XML within your application, which is an important decision because XML incurs processing overhead. This overhead manifests itself in different ways depending on whether youÆre are consuming or producing it. For XML consumers you needùat a minimumùa method to parse the XML. YouÆll likely also need an object model to access parsed data. For XML producers, converting native formats to XML incurs overhead. On the middle tier, the processing overhead is crucial. If your middle-tier program manipulates, performs calculations on, or reformats the data and your database is inside the firewall, XML should not be your first choice. In this case, requesting a normal result set from a database and using traditional data-access methods to perform application processing will be more efficient. After processing is complete, the middle tier program can generate XML output. Using traditional data-access methods avoids the overhead of generating XML in the database as well as overhead parsing XML and building an object model on the middle tier. The only benefit from generating XML in the middle tier is that you can loosely couple your middle tier application and your database, but cost is significant.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.