Building an application with extjs and POG part 2: The Data Model
September 19th, 2007In part one we discussed the general layout and design of the application. In this chapter we will build the server side in the storage for the application using the powerful PHP object generator (POG).
To get started with POG point your web browser to www.phpobjectgenerator.com and fill out the form to create each of your objects. Download the zip file provided for each object you create. Note: The zip files may not open properly in Mac OS X
To get things started here are the objects for the current project.


Now, unzip all of the POG zip files into the same directory in your development server. It will gripe about overwriting some files each time, that’s ok. The /objects folder should now contain the following files.
- class.database.php
- class.feature.php
- class.pog_base.php
- class.role.php
- class.task.php
- class.user.php
- ignore_objects.txt
Now we need to get the Database in on the action. Go to your local MySQL installation and create a new database, user & password with full schema permissions. Edit the configuration.php file located in the POG root and change the following lines to match your database settings.
$configuration[’db’] = ‘pogext’; // database name
$configuration[’host’] = ‘localhost’; // database host
$configuration[’user’] = ‘username’; // database user
$configuration[’pass’] = ‘password’; // database password
$configuration[’port’] = ‘3306′; // database port
You also need to change the very last line of the file to point to the POG plugins directory. On my dev machine it was:
$configuration[’plugins_path’] = ‘C:\xampp\htdocs\extjs\plugins’;
At this point, pog is ready tor run and create our database. Point a webbrowser to the /setup directory and hit the big POG ME UP button. This will create all of our database tables and provide us with a temporary scaffold interface for entering data.
Next Time We’ll start using POG to build the login and authentication systems.



Previous Post
Next Post

1 Comment
February 3rd, 2008 at 6:39 pm
Hi,
Is there a part 3 for this tutorial?
Leave a Reply