In this final section of the chapter, we are establishing the scheme of a basic code structure, which we will use in all the following case studies. Most of the basic building blocks have already been presented, except for separating the sever-side business logic in a separate class, which will be demonstrated in a new exercise.
So far, the server-side code was always built as a single PHP file. In order to achieve better flexibility and a more powerful design, we will split the server-side PHP functionality in two files:
One script, called
GET, and will make decisions based on these parameters.
The second script, called
appname.class.php, will contain a helper class named
Appname, which encapsulates the real functionality that needs to be processed. The...