<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
 <!-- page name="introduction"-->
 <template>
  <do optional="false" label="Back" type="prev">
   <prev/>
  </do>
 </template>
 <card ordered="true" newcontext="false" id="intro">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="templates.wml#mobile"/>
  </do>
  <!-- h1 -->
  <h1>XML paradigms compared to programming paradigms</h1>
  <p>In the same way that there is more than one paradigm in programming, there is more than one way to look at XML. As for the former, there is procedural, Object-Oriented Programming (OOP) and Aspect-Oriented Programming (AOP). In the same manner, there are a number of ways to look at XML: </p>
  <p align="left">as simply a way to store and/or transmit data</p>
  <p align="left">XML can be viewed as yet another format for storing data items. In some ways, this is equivalent to doing procedural programming in an object-oriented programming language. The advantage is that you can get the immediate job done fairly well without having to shift your paradigm. The disadvantage is that procedure code is typically not reusable. So the next time a similar task needs to be accomplished, new code must be developed. This is called Reinventing The Wheel (RTW). </p>
  <p align="left">Likewise, simply looking at XML as a way to store and/or transmit data can make it easier to implement a specific application. An example of this is RSS 0.9x / 2.0, which makes good use of XML as a way to transmit data items to accomplish the job of delivering syndicated web feeds. The limitations of this might not be apparent until you start encountering problems with the schema or, such as in the case of RSS, the lack of one. Because of this, RSS feeds cannot be validated with standard XML validators; it becomes necessary to "reinvent the wheel" with validation specific to the RSS format. The lack of a determistic schema is one of the <a href="http://www.ContentAggregator.com/feeds/openfeed#issues">limitations of RSS</a> and is not even resolved with the <a href="http://www.ContentAggregator.com/feeds/openfeed#issues">Atom Syndication Format</a>, although <a href="http://www.ContentAggregator.com/feeds/openfeed2.wml">Open Feed Format</a> does provide one and can be easily transformed into either RSS or Atom Syndication Formats. </p>
  <p align="left">as a way to store and/or aggregate content</p>
  <p align="left">It takes a serious paradigm shift to start looking at XML as a way to store content, rather than just collections of data items. This is equivalent to the shift in paradigms from looking at an object-oriented programming language as a set of procedural instructions to a way to manipulate more robust objects. </p>
  <p align="left">This is the biggest jump that is needed in making good use of XML, just like understanding objects is the biggest jump in understanding OOP. When you see code written in an OOP language that is consistently passing a particular object as a parameter to almost every method, you recognize that the author of that code has not yet made the leap. Likewise, when you look at the design of the RSS feed format, you can see that the author(s) had not yet made the leap to the next level, (or possibly that they did not want to rely on users having made the leap). </p>
  <p align="left">This does not mean that you have to abandon HTML development. On second thought, I take that back - actually, yes it does. It means you have to abandon 1997 HTML 4.x development and IE 4.x compatibility in favor of XHTML and more recent browsers. XHTML web pages are simply a particular type of XML documents. Therefore, you should start to think of XHTML not just as a markup language for creating web pages, but as a means for delivering content. Once you've made this leap to the new paradigm, you can do things like: <p align="left"/>
  </p>
  <p align="left">as a way to integrate content</p>
  <p align="left">Aspect-Oriented Programming takes OOP to the next level by looking at objects in multiple dimensions, rather than just a single dimension. The analogy with the three-dimensional space, of which we are quite familiar, would be that OOP looks at objects in the vertical (up/down, class/subclass) direction, and AOP adds the horizontal directions. The view of objects in the horizontal directions are called cross-cutting concerns. </p>
  <p align="left">Likewise, if you've already made the leap to looking at XML as a way to store and/or aggregate content, it's relatively easy to take this to the next level and consider XML as a means for integration of content. Content and navigation do not need to be limited to simply moving through web pages in sequence; it can simultaneously be gathered from multiple directions and integrated. This was the promise of the <a href="http://www.SemanticWeb.info/">Semantic Web</a>, but has been painfully slow in becoming reality, presumably because most content providers have not yet even made the first leap in making good use of XML in their content. </p>
  <p align="left">
   <a href="templates.wml#mobile">Next: Page 2</a>
   <br/>
   <a href="index.wml">Back Up: XML</a>
   <br/>
  </p>
 </card>
</wml>

