Data Sources that provide XML

Top  Previous  Next

Data Sources are managed by MoreMotion AF and provide XML. When MoreMotion AF receives a Display Page request for a dynamic page that uses data sources, it first calls the data service classes associated with the data sources to let them populate data in ADOMs and later it builds one XML document (Page XML Data) where all the required data for the page is available.

This is a sample Page XML Data generated by MoreMotion AF. The root level node is always "root" and the data source nodes come right under it as the second level nodes.

 

 <root> <!-- Root Tag -->

  <courses> <!-- Data Source -->

     <item>

      <id>1</id>

      <name>Java Programming</name>

      <teacher>John Doe</teacher>

    </item>

    <item>

      <id>2</id>

      <name>C++ Programming</name>

      <teacher>Minny Driver</teacher>

    </item>

  </courses>

  <students> <!-- Data Source -->

    <item>

      <name>Mary Joe</name>

      <course_id>1</course_id>

    </item>

    <item>

      <name>Michael Sample</name>

      <course_id>1</course_id>

    </item>

    <item>

      <name>Edith Burque</name>

      <course_id>2</course_id>

    </item>

  </students>

  </root>

 

If there is dynamic definition used in a page as follows

datasource_usage

The first qualifier of the definition is a data request; that is "courses" in our case. During the build, Application Studio generates configuration files under /WEB-INF/MM-INF/config directory and the data request and data source definitions made in the project pages are transferred to the MoreMotion AF with dataRequest and dataSource definitions made in these files.