The Last Mile

I l @ ve RuBoard

As you might imagine, business logic can be the most troublesome part of software development because it needs to conform to the (sometimes illogical) needs of your customer rather than to some pure computer science concept.

When developing business logic, try to place as much of the ruleset into some kind of database or other easily changeable form rather than in the code. In the example of promotions, this was done by reading the promotions from a table.

If a given piece of business- related functionality isn't available at the time that you are writing dependent codes, stub it out with a testing switch so that you can proceed, and make sure that the code flags an error if you try to go live before the actual code is in place.

With this code in place, you've run 25 miles of the marathon. All that needs to be done now is to actually validate the charge (which will again be stubbed out), record the order, and send an order confirmation.

This is what you'll do in the next chapter. You'll also look at order history, order fulfillment, and a general wrap-up of the application and where it could go from there.

I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net