 | News Feed |
Sections
|
| feed this: |  |
ProDevTips.com: Extending PHP Doctrine Record - Check Box Groups
by Chris Cornutt August 12, 2008 @ 13:26:36
In the third part of the series dealing with using Doctrine in your PHP applications, ProDevTips has this third part looking at a method for extending the tool's current functionality.
I simply knew we would need the extension capability that the Mdl class allows for sooner or later, I didn't expect it to be this soon though. The main problem here is saving a many to many relationship straight to the database from the $_POST array, to do that we can extend Doctrine Record with a new function I have named fromArrayExt which adds something extra to the normal fromArray method.
He shows how to extend the classes to create custom handlers for a grouping of checkboxes. The new code automatically handles their submitted values and pushes them directly into the database (with a simple save() call).
voice your opinion now!
doctrine record tutorial checkbox extend group
ProDevTips.com: Table of contents for Working with Doctrine
by Chris Cornutt August 08, 2008 @ 15:10:03
Henrik has posted the second part of his look at using Doctrine, this time in combining it with Smarty. (Check out part one here).
We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.
He shows how to be "empowered, not stifled" by the framework and to combine the two technologies in a flexible, lightweight platform. His example is a simple signup form that, on submit, saves the information to the database via the Doctrine layer.
voice your opinion now!
zendframework smarty doctrine framework mvc tutorial
ProDevTips.com: Doctrine for dummies
by Chris Cornutt August 05, 2008 @ 12:55:52
Henrik waves goodbye to the Zend_Db component of the Zend Framework in this new post to the ProDevTips blog - his new favorite is Doctrine.
It was long overdue but finally I've taken a look at Doctrine. And I'm blown away, bye bye Zend DB. [...] It's time to try and convey how awesome I think Doctrine is.
His example sets up a table definition and defines the associations between the columns for a "members" table. He defines a "city" table too and shows how Doctrine can easily combine the two and make selecting from and inserting into the tables simple.
voice your opinion now!
doctrine database abstraction layer zenddb
Francois Zeninotto's Blog: Comparing Propel, Doctrine and sfPropelFinder
by Chris Cornutt July 09, 2008 @ 10:24:59
Francois Zeninotto has posted a comparison of three different ORM (Object Relational Mapping) layers for PHP - Propel, Doctrine and sfPropelFinder (the last being a plugin of the symfony framework).
When it comes to ORMs, it's all a matter of preference. Is it, really? This post compares side-by-side the code required to perform some simple operations with three OO database requesting API. The purpose is to demonstrate that productivity, and not only style, can vary a lot depending on the ORM you choose.
He's worked up a long list of examples including methods to:
- Retrieving an article by its primary key
- Retrieving the latest 5 articles
- Retrieving articles based on a complex AND/OR clause
- Retrieving articles authored by people of a certain group
- Retrieving an article and its category by the article primary key
- Retrieving articles and hydrating their author object and the author group
Each one comes with their own (usually simple) code. His conclusions point out different "bests" of each - like sfPropelFinder being the "most magic" and that some of the limits of Propel are very frustrating.
voice your opinion now!
compare orm layer doctrine propel sfpropelfinder symfony framework
|
Community Events
Don't see your event here? Let us know!
|