Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Use XForms to create an accounting tool, Part 4: More asset management and reporting

Track user requests regarding assets in X-Trapolate

Nicholas Chase (ibmquestions@nicholaschase.com), Freelance writer, Backstop Media
Nicholas Chase has been involved in Web site development for companies such as Lucent Technologies, Sun Microsystems, Oracle, and the Tampa Bay Buccaneers. Nick has been a high school physics teacher, a low-level radioactive waste facility manager, an online science fiction magazine editor, a multimedia engineer, an Oracle instructor, and the Chief Technology Officer of an interactive communications company. He is the author of several books, including XML Primer Plus (Sams).
Stony Yakovac (syakovac@gmail.com), Software engineer, Freelance
Stony Yakovac is an engineer and freelance author living in Lava Hot Springs, Idaho. He works on a wide variety of projects, including software and digital hardware designs.

Summary:  This six-part series demonstrates how to leverage the power of XForms in conjunction with MySQL and PHP for support processing to create an online accounting tool called X-Trapolate. Every good programming technology possesses a range of problems it excels at solving. The series highlights some of the problems that the XForms solves effectively, such as the need for live calculations and greater interactivity. Part 4 of this six-part series demonstrates how to pull together many of the techniques touched on in earlier installments using the example of the order review form and the asset management form, with special privileges for procurement users. It also introduces new techniques for handling real-world issues.

View more content in this series

Date:  17 Apr 2007
Level:  Intermediate PDF:  A4 and Letter (1641 KB | 62 pages)Get Adobe® Reader®

Activity:  8188 views
Comments:  

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.

About this tutorial

View the other articles and tutorials in this series.

In Part 3 of this series, you created a form to track the assets of your fictional company in terms of budgets, profit, and expenses. Here in Part 4, you are going to look at assets a little more literally.

Every business has assets, whether they are buildings, assembly-line robots, computers, or simple tools. Those assets must be purchased, maintained, and replaced at various intervals. In this tutorial, you will build a form to track user requests regarding assets. You will build one form for typical users, and another for the procurement users responsible for resolving such issues.

You will also build a form for reviewing orders. In both cases, you will see some of the kinds of issues that arise when you attempt to build an actual application. How do you combine information from separate database tables? What happens when the data is not structured to make your XForms functionality convenient? This tutorial explores those issues.

In the course of this tutorial, you will learn:

  • How to create a master-detail form using XForms
  • How to use nested switch/case statements to handle multiple situations simultaneously
  • How to build an XML instance from multiple database tables
  • How to automatically set "live" data such as the current date after a form has loaded
  • How to build a single-value checkbox

About this series

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 all the portions of the end result and what 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.

Prerequisites

This tutorial uses a MySQL database for storage and reference. Necessary SQL commands appear throughout the article, but require a working knowledge of MySQL. 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 from developerWorks (see Resources). XForms is built on XML, and, hence, a basic understanding of XML is also assumed.

Other technologies and concepts may also be involved, but they will be to a much lesser extent and should be inconsequential to the reader's comprehension of the topic.


System requirements

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.

1 of 11 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=210021
TutorialTitle=Use XForms to create an accounting tool, Part 4: More asset management and reporting
publish-date=04172007
author1-email=ibmquestions@nicholaschase.com
author1-email-cc=dwxed@us.ibm.com
author2-email=syakovac@gmail.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.