Before you start
This tutorial is for developers investigating the use of XForms in real-world situations, rather than "toy" applications. It describes the use of XForms in creating two different accounting forms as part of the X-Trapolate accounting application. This tutorial assumes that you're familiar with the basics of XForms. No accounting knowledge is required.
This tutorial, Part 5 of a six-part series, develops the liability management side of the accounting tool, along with an executive analysis tool that generates reports on the billing side.
Every business has liabilities and payments, so a tool to help manage and create payments would be beneficial to keep track of things. In this tutorial you'll develop one form, which will be called the payables form, that allows you to create different types of liabilities and payments, including salary, wage and bill types for various departments in the business that can be credited or debited to/from a specified account.
You will also a develop a second form, called the reports form, for analyzing billing data and statistics, such as total customer credits and delinquent amounts. You'll also learn how to use the bind element and its calculate attribute to create a textual representation of a bar graph.
In this tutorial you will learn how to:
- Use
bindandcalculateto create two forms - Select only certain records using XPath in a
repeatstatement - Use check boxes to select which records to add, save, or remove
The purpose of the series is to demonstrate the use of XForms in the development of realistic Web applications and to instruct the reader in the use of XForms.
- Part 1 is an introduction to the entire series, summarizing the facets of the XForms specification each part covers.
- Part 2 covers logging in and account management.
- Part 3 covers the development of forms pertaining to asset management.
- Part 4 continues the coverage of the development of asset management and reporting of various accounting aspects of a business.
- Part 5 covers liability management and more enhancements.
- Part 6 concludes the series with a summary of the developed tools, and some suggestions for improvement and further work for the tool set.
This tutorial uses a MySQL database for storage and reference. PHPMyAdmin offers equivalent access to configure the MySQL database and view the entries from a menu driven graphical interface.
Though the purpose of the series is to educate the reader about the use of XForms, some background is expected. There are some very good articles and introductory series concerning XForms available on IBM developerWorks (see Resources). XForms is built on XML, and, hence, a basic understanding of XML is also assumed.
The following software is required to follow along with this tutorial:
- A browser capable of displaying XForms such as Firefox 2.0.1.
- A Web server with PHP enabled such as WAMP
- An SQL server, MySQL, which is part of the WAMP package in this case.




