NYCPHP Meetup

NYPHP.org

[nycphp-talk] connecting objects and relations

csnyder chsnyder at gmail.com
Sun Oct 3 12:47:05 EDT 2004


On Sat, 2 Oct 2004 20:27:57 -0400, Mitch Pirtle <mitch.pirtle at gmail.com> wrote:
> http://propel.phpdb.org/wiki/

Hey, now that's pretty slick -- from the documentation there's
obviously some intelligent people working on that project. Check out
the code -- is it simple and straightforward? Does it look like code
you'd write, if you had the time?

I went down this road on my own a couple years ago -- defining schemas
outside of SQL, letting the code build the tables and worry about the
query details. I never actually got to the point where I implemented
SelectPeer( $obj ), though. Even though I could see the usefulness of
that, I didn't like being so out of control.

The problem comes when you start trying to do selects based on complex
criteria, as evidenced here:
http://propel.phpdb.org/docs/user_guide/chapters/FindingObjects.html#FindingRecods.Criteria

In my opinion, SQL is graceful compared to the code you have to write
to do create a complex Criteria object. At the end of the day, you
probably still need to know enough SQL to handle the edge cases, while
also knowing how to read the XML schemas and construct Criteria
objects.

That said, it-just-works object persistance is a real power tool, and
if you take this up seriously you'll probably never look back.



More information about the talk mailing list