Cleaning Things Up

I l @ ve RuBoard

At this stage, the code is in good shape, for the most part, but you can still do a few things to make it better. For example, you have the same JSP in several different places. The code that produces the featured product is the same as the code for the product detail page. The code for the listing by author and by category are also the same. If you put them all into include s, it will reduce the size of the parent files and also reduce the number of places in the code that will need to be changed if you want to alter the files.

You should also think a little more carefully about what would happen if a ProductActivityException was thrown. You should be using a try to catch it and redirect to an error page.

And speaking of error pages, it is getting tiring putting the same error text at the bottom of each page with only slight variations. Perhaps it is time to rethink and standardize your error pages ”something you can do in your spare time after reading the book.

One thing that you can be happy about is that, because of the way you designed the document hierarchy, people can bookmark or e-mail links to products, authors, and categories freely . This is a very important feature in an e-commerce site because it helps drive sales.

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