The Last Mile

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. ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL 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.