Understanding the Scope

The sample application is the most ambitious example presented in this book yet. As such, it’s a good idea to create a checklist and breakdown of what is involved and what dependencies exist.

This application can be created on one machine, but that machine needs to have all the different components installed. Ideally, two machines are a better fit. Regardless, the five pieces involved are as follows:

  • A simple relational database that hosts one simple table. I used SQL Server, but MySQL or Postgres should work just fine.

  • Data Access Object. This native Python class will encapsulate the data held within the SQL database behind an XML-friendly interface.

  • An XML data store. This is a flat file that you create, coupled with an object to access the data using XML for both input and output.

  • The XML Switch. The XML Switch itself is a Python-based interpretive XML-routing and object-brokering mechanism. If loaded with a routing table, it could analyze an incoming XML SOAP packet with XPath and determine which destination it should travel to. It could send a SOAP packet anywhere, including to web servers. In this example, the switch uses XML messages as RPC calls into the objects it hosts.

  • Web/CGI Application. This a Python-based CGI script and accompanying web page similar to the CGI scripts created earlier in this book. It should run on any web server (IIS, Apache) that has been configured for CGI.

The code used in these examples is intended as a starting point for educational ...

Get Python & XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.