- Introduction to POG
- Setting up PHP, MySQL etc.
- Designing your objects
- Generating your code
- Description of the generated code
- Edit configuration file
- The Setup Process
- Using the code: Save()
- Using the code: Get()
- Using the code: SaveNew()
- Using the code: GetList()
- Using the code: Delete()
- Using the code: DeleteList()
- Advanced: object relations
- Advanced: Set{Parent}()
- Advanced: Get{Parent}()
- Advanced: Add{Child}()
- Advanced: Get{Child}List()
- Advanced: Save(deep)
- Advanced: Delete(deep)
- Advanced: Add{Sibling}()
- Advanced: Set{Child}List()
- Advanced: Set{Sibling}List()
- Advanced: Get{Sibling}List()
- Advanced: DeleteList(deep)
- Customizing POG-generated code
- Customizing: Extending POG Objects
- Customizing: Plugins
- Examples
- Examples: User registration system
- Examples: User authentication
- Examples: Survey form
- Examples: Using POG with AJAX
- PDO: Introduction
- PDO: SQLite example
- PDO: Firebird example
- PDO: PostgreSQL example
- PDO: MySQL example
- PDO: ODBC example
- Troubleshooting
- Troubleshooting: Data appears encoded
- Troubleshooting: Can't regenerate object
- Troubleshooting: Can't seem to Save()
- Troubleshooting: Can't get object / object attributes from database
- Troubleshooting: Can't open zip file on Mac
- Troubleshooting: Setup screen is blank
- Videos
- Appendix: Creating table(s) manually
- Appendix: Regenerating objects
- Appendix: Generating objects using SOAP
- Case Study: Gravity GTD
- Case Study: Web Form Factory
Back to the Code Generator
The POG Weblog and RSS feed.
The POG Google group
Designing your objects
Depending on the project, the objects you’ll need will be different. For instance, if you’re writing a registration system for a website, then, one of the object you’ll need is a “USER” object. On the other hand, if you’re writing a library-type application, one of the object you’ll need is a “BOOK” object.
Then you need to decide what attributes your object will store. For example, if you decide to create a “BOOK” object, you’ll probably want to store the following attributes for the book:
- bookTitle
- author
- numberOfPages
- isbn
- price
- comments
If you’ve ever done any programming, you should know that one thing that always happens is that requirements change and evolve. A week or two after starting your project, you’ll suddenly be notified (or realize on your own) that you need a few other attributes such as the year the book has been published. This is where the @link feature in POG becomes really handy. (read more about @link)
Once you’re satisfied with how your object looks, you can Generate the code for it.
We regularly give pointers and tips about code generation and PHP objects in the POG Blog. We encourage you to subscribe to our RSS feed so you’re kept up-to-date with anything POG-related.
Proceed to next step of the tutorial ››



Keep your objects relatively small. Having smaller objects equals faster code. For example, if you’re designing a registration system where users can upload a picture of themselves, the easiest way to do this is to create a User object with a picture attribute. There’s nothing wrong with that, and it works fine. However, if you want faster code, you should split your object into a User and an Image object. In this case, you would have an image id attribute that links the user object to the image object. This way, whenever you’re trying to get a list of user names from the User table in the database, you’re not retrieving large amounts of data unnecessarily.
The rule of thumb is: Whenever you’re storing multimedia files as such as video, pictures and music, do not store them as attributes of another object. Instead, store them as objects themselves.