NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database Abstraction / ORM

federico ulfo rainelemental at gmail.com
Mon May 7 08:28:25 EDT 2012


I suggest to take a look to red bean, is impressive how easy it is and
right now has one of the most active community!

http://redbeanphp.com


Sent from my iPhone

On May 7, 2012, at 8:16 AM, Justin Demaris <justin.demaris at gmail.com> wrote:

> Hello PHP Talkers,
>
> How do you guys feel about ORM systems and other database abstraction layers? I've been working a lot lately with an older version of Kohana (fun!) and doing a lot of performance optimization. A good chunk of improvement has come out of removing reliance on the old Kohana ORM and replacing it with simple mysqli calls. Is there any ORM system out there that just does it right? Namely, I'd be looking for things like:
>
> 1) When I instantiate an object by it's ID multiple times, it doesn't bother to hit up the database after the first time, but just keeps giving me copies of the same object
>
> 2) Lazy load the object values. There are a number of patterns where I've seen people instantiate a bunch of objects and then only use a small subset of them. It would be nice if the object only loaded the data when we try to reference one of its non-ID properties.
>
> 3) Ability to tweak the back end to work with other database systems (especially Riak, Mongo and Cassandra)
>
> I have had really good luck in the past working with Yii and integrating with Redis to use their Active Record structure, but I'm not sure of the performance there. Also, I've been hearing a lot about Doctrine 2 lately and the necessity of having an extra Data Mapper layer in the middle that separates the classes and properties from the fields and tables that store the data.
>
> Let me know what you guys have experienced, and no pressure since this decision is probably going to affect my sleep and happiness for a few years!! ;)
>
> ~ Justin DeMaris
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation



More information about the talk mailing list