Prev | Current Page 128 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"


4. Create the business tier components of the departments list (the Catalog class and its
GetDepartments() method). You??™ll see how to communicate with the database, through
the DatabaseHandler helper class, to retrieve the necessary data.
5. Implement the departments_list Smarty componentized template, the load_
presentation_object Smarty plug-in that glues the templates and their associated
presentation objects. The DepartmentList presentation object is needed by the
departments_list template.
So, let??™s start by creating the department table.
Storing Catalog Information
The vast majority of web applications, e-commerce web sites being no exception, live around
the data they manage. Analyzing and understanding the data you need to store and process is
an essential step in successfully completing your project.
The typical data storage solution for this kind of application is a relational database.
However, this is not a requirement??”you have the freedom to create your own data access
layer and have whatever kind of data structures you want to support your application.
?– Note In some particular cases, it may be preferable to store your data in plain text files or XML files
instead of databases, but these solutions are generally not suited for applications such as TShirtShop, so we
won??™t cover them in this book. However, it??™s good to know your options.


Pages:
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
wentylacja kredyt samochodowy zarządzanie produkcją serwis ploterów wybor