The odd bit

Once is an accident, twice is a coincidence, three times is an enemy action.

The odd bit - Once is an accident, twice is a coincidence, three times is an enemy action.

Zend Framework (PHP)

I’m currently working on a website for myself using the Zend Framework. Actually, it’s take #3 of the project. The first attempt never had a chance of succeeding even remotely. The second attempt was much better, but the pieces of the puzzle didn’t really fit together.

The biggest problem I experienced while working on the second attempt was the data persistence implementation of the eZ components. It’s really not convenient to work with: you must implement at least two functions (even though the API doesn’t force you to implement them) to manually return the data that should go into the database and to set object properties to values from the database. You also need to create a definition file that maps properties to database fields. Hey, if there’s a mapping, why do I still need to implement manual getting/setting in the class? Another major shortcoming is that a table’s primary key must be an auto-increment integer.
Data persistence is a lot easier in the Zend Framework. All you need to do with your class is extend the Zend_Db_Table class, follow a couple of naming conventions and it works! If you really want to be a difficult guy, you can override the naming conventions.

That’s the biggest difference I’ve encountered so far. There will probably be follow-ups to this post as I continue to dig deeper in the Zend Framework.

Your email address will not be published. Required fields are marked *

*