Your in-class assignment, and homework assignment for Class 6 was to use PHP to templatize the e-commerce pages you made last class.
What do I mean templatize? If you had a real store with hundreds or thousands of products, you would not want to hand-code all the pages and hand code all of the image tags and information for all of the products. You would want to use templates for those elements that are common across all pages. You write one snippet of HTML somewhere and re-use it all across the site.
Not only do you not have to rewrite the same code hundreds of times, but templatizing also makes site maintenance easier. If someone wants to change slightly the design of how the products are displayed, for example, they only have to make a change in one place, not in thousands of different places.
For this assignment, you will be templatizing the top-nav section of your pages, the footer, and each of the products in the store. The product thumbnails and product detail information divs for all products in the store should be working off of one template that is applied to all products. Of course, this means that your Javascript code that creates the mouseover effect on all product thumbnails will also have to work with the templates.
You will want to look at the example code we worked on in Class 6 to see how we templatized certain parts of those pages.
Saturday, October 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment