Php Object Generator 2.6

POG (PHP Object Generator) saves the PHP developer time by generating tested and efficient PHP Objects. The programming pattern behind POG is Object-Relational Mapping also known as Active Record or Persistence Layer. Above all else, the generated code has been designed to be extremely clean, easy to understand and use.

Put simply, whenever you're programming with PHP and a database, POG will help accelerate your development. POG generates PHP classes which map to tables in your database. The database used can be any one of the following: MySQL, Firebird, SQL Server, SQLite, PostgreSQL.

Accelerating Development
Simple & Useful
The PHP classes generated by POG have 5 public methods which allow you to perform atomic database operations using the objects. These are often referred to as CRUD operations (CREATE, RETRIEVE, UPDATE and DELETE). The 5 methods generated by POG are named: Save, SaveNew, Get, GetList and Delete.

For example, if you generate a 'user' class with 'firstName' and 'lastName' attributes, calling the Save function like so

$user -> firstName = "John";
$user -> lastName = "Smith";
$user -> Save();

will simply insert the value "John" in the "firstname" column in the "user" table. Similarly, the value "Smith" is placed in the "lastname" column.

So in effect, POG is saving you time because you don't have to write any SQL queries to do simple operations such as Inserts, Retrieve etc. Using objects to represent database tables is a very popular programming pattern known as "object-relational mapping". In the Ruby programming world, it is known specifically as ActiveRecord whereas in the Java world, it's often referred to as a "persistence layer".

Background
Origin
PHP Object Generator was created simply because there is a lack of good PHP code generators on the internet. Development efforts by other individuals or groups seem to be focused mostly on creating PHP frameworks whereas we focus on making the best code generator possible. POG is authored by Joel Wan (twitter) and Mark Slemko.

Intended Audience
Code generation has long been and is still a dividing issue among programmers. On one side there are those who embrace it, and on the other, those who disdain it. The problem has so far been that authors of code generators have either tried to do too much, or hyped their products beyond their actual capabilities.

On our side, we're trying to solve a very specific issue: Focus on making the best generator of PHP objects with integrated CRUD methods. We don't claim that POG will generate your entire web application for you. However, we are very confident POG will help you get started faster and make your web application easier to maintain in the long run. We've chosen this particular programming design pattern (ORM) because it is a very simple concept to grasp and fits very well with PHP database programming. It is however not as widespread as it should be simply because many new developers haven't been introduced to the ORM pattern yet.

More Information
Video example
If you're interested to see PHP Object Generator in action, download this 4 min introductory video

Do-it-yourself
Give PHP Object Generator and see for yourself what code generation is all about

License type: BSD License
Date added: 3 years, 11 months 28 days ago | Last updated: 3 years, 11 months 28 days ago

More popular Tool Resource

Listing Files

POGv2.6
  • php.ini
  • 53 Bytes
  • 08/14/2006 06:46:12
  • favicon.ico
  • 1007 Bytes
  • 04/12/2006 21:33:00
include
configuration_factory
List All Files