Implementing such features will
become easier as you get used to the project structure in the following chapters.
What??™s interesting to note about this exercise are the way we used the session to implement the Continue Shopping
link and the way we display the list of categories in the product details page. Whether a product page is visited
from the front page of the catalog, is loaded directly in your browser, or is navigated to from an external web site,
the list of categories doesn??™t show up. On the other hand, if you browsed a department or a category before loading
a product details page, the department and category navigation elements show up in the product details page
as well.
The code was explained throughout the exercise, so we??™ll not revisit it again. Read it again, and make sure you
understand it clearly before moving on to the next chapter.
CHAPTER 5 ?– CREATING THE PRODUCT CATALOG: PART 2 173
Summary
Congratulations! You??™ve done a lot of work in this chapter! You finished building the product
catalog by implementing the necessary logic in the data, business, and presentation tiers. On
the way, you learned a great deal of theory, including
??? Relational data and the types of relationships that can occur between tables
??? How to obtain data from multiple tables in a single result set using JOIN and how to
filter the results using WHERE
??? How to display the list of categories and products depending on what page the visitor is
browsing
??? How to display a product details page and implement the Continue Shopping
functionality
??? How to implement paging in the products list when browsing pages containing many
products
It??™s OK if you found much of the code quite complex, because it really is.
Pages:
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274