NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database Abstraction / ORM

Agustin Casiva casivaagustin at gmail.com
Mon May 7 09:22:01 EDT 2012


I think that Doctrine is a good alternative, have several features.

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/index.html

Also have a version for Mongo as Backend

http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/

Another option is Propel, is more simple and fast but not so powerful like
doctrine.

http://www.propelorm.org/

Best Regards

On Mon, May 7, 2012 at 9:52 AM, Justin Demaris <justin.demaris at gmail.com>wrote:

> Wow, that's pretty cool. My first reaction was pretty strongly against
> it... anything that does database voodoo on the fly worries me, but it
> allows you freeze the schema or even partially freeze the schema if you are
> working on adding new features, it has validation hooks, you can build in
> your own mapper, it has event listeners at key points and it looks like it
> wouldn't be that hard to adapt it to other data store styles.
>
> Impressive and thanks!
>
> ~ Justin
>
>
> On Mon, May 7, 2012 at 8:28 AM, federico ulfo <rainelemental at gmail.com>wrote:
>
>> 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
>> _______________________________________________
>> New York PHP User Group Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> http://www.nyphp.org/show-participation
>>
>
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation
>



-- 
Ing. Casiva  Agustin

Mail/Msn/GTalk/Jabber: casivaagustin at gmail.com
Skype: casivaagustin
CEL : 054-03722-15270639
Site: http://www.casivaagustin.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20120507/c7972925/attachment.html>


More information about the talk mailing list