School of Computing  |  Napier  |  Cisco  |  SFC  |  NOS  |  Code |  Old page



(001) XML-based and database-driven WWW content


XML, Flash, SQL, Dreamweaver/FrontPage


To produce a prototype of dynamic content WWW pages using both XML and database-systems


To produce integrated XML and WWW pages, using a database system


All of the main areas have been investigate and have been proven to work. Flash 5 will read XML and PHP works well with MySQL. It is likely, though, that a server will have to be setup on a remote site. This is only likely to cost around £3/month, and should support MySQL.


Cedric LEO (00210536)


Project review [Feb 2002]
Project document [May 2002]
Source code [May 2002]
Poster [May 2002]


This project proposes an approach for developing reconfigurable-Web-content prototypes. You have to consider that the key to understand and to integrate reliable and robust dynamic prototypes is to design reusable components.

The basic idea is that before implementing your components you have to take into account technologies that are compatible with most of users and exist to last. For its across-system functionality, PHP has then been accepted as well as Flash, an authoring tool, which enhances the interactivity and dynamism of Web pages with the aid of its integrated language, ActionScript. The concept of reconfigurable Web content is also inherent in the storage of data. Assuming that databases have to be across-system such as the previous scripting languages, the wide range of databases is reduced at two methods of data storage:

- A new structured file technology, XML
- And a robust and proven-to-work database, MySQL.

Investing these technologies serves to list several assumptions about implementing methods. In fact, the most common method for design reuse is the Object-Oriented method. Designing objects is managing the complexity of your prototypes and splitting your project into manageable components. This method is relevant for extracting data from XML documents. Indeed, PHP with its XML handlers and its capabilities of developing classes enhances the reliability of your components. As well as the server side language, Macromedia provides XML objects to evolve Flash movies. In another hand, an attractive interface is inherent in the Web content that is displayed, so a meticulous study of what a relevant interface design is has to be investigated.

To perform the reusable component's study, several prototypes have to be developed according to the next aims:

- Displaying web content from structured file, XML: objects and PHP functions are combined to fulfil this component.
- Displaying web content from a database, MySQL: to implement a component with similar aims that the XML one using only PHP functions.
- Streaming dynamic sound with Flash and XML files: to provide dynamism using client-side scripting languages only and JavaScript/ActionScript communication.
- A voting system storing users' information and displaying it back: editing and creating XML files with PHP as middleware and Flash as client side interface.

While the implementation, components are subject to several evaluations:

- A Human Computer Interface has to satisfy the user's eye.
- Authoring tools or Server side script language: dynamic display from different locations of the network, client and server side.
- Comparing databases systems and structured files clarifies their strengths and weakness for a future use.
- Scripts architecture: are Object-Oriented scripts reliable and robust?
- Overhead of display: what is the fastest component, the one using XML or MySQL?

In spite of the technological challenges dynamic reconfigurable web content components are capable and operational applications. They prove to be robust and reliable.

Initial aims

The aim of this project to to generate WWW content using XML and MySQL. I've investigated the main areas, such as integrating XML [link] and also integrating PHP with MySQL.

XML is the language of the future, and is the true integrator of definition languages. It can be used in many applications, and is portable across systems. XML is similar to HTML, but XML allows for tags to be defined by the user. An example of an XML file is:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE questions SYSTEM">
 <quest id="000001">
  <title>This is the first question</title>
  <q1>Answer a1</q1>
  <q2>Answer a2</q2>
  <q3>Answer a3</q3>
  <q4>Answer a4</q4> 
  <q5>Answer a5</q5>
 <quest id="000002">
  <title>This is the second question</title>
  <q1>Answer b1</q1>
  <q2>Answer b2</q2>
  <q3>Answer b3</q3>
  <q4>Answer b4</q4>
  <q5>Answer b5</q5>
; ; ; ;

An example with an proper questions is:

Source code: Here [This contains the Flash 5 code required to read an XML file, and display it] and here.

A basic outline of the system is show below. The XML generator is a basic package which converts a file, such as a spreadsheet to XML data. This might contain page layout information which can be used by the WWW page. The XML file is then read by the Flash component. As much as possible the component will be general-purpose, and will read its parameters from the XML file. An example of a component could be for a links page, which contains up-to-the-minute information. The Flash component then communicates with the WWW page through the fscommand() function, and calls the dofscommand() JavaScript event. The WWW page itself can pass parameters into the component using Active X. This will allow the component to change its operation. For example this might be to change the language of the text from one language (such as English) to another (such as French). The Flash component might thus have to read another XML file for the required information.

Click on this graphic to expand it

Figure 1: XML-based WWW generator and reader system (©billatnapier)





School of Computing  |  Napier  |  Cisco  |  SFC  |  NOS  |  Code |  Old page

Page maintained by bill