[ASK] Why using ORM?

Sorry if there were similar questions like mine before,

Quote:i'm just confused, why us people using other ORM like Doctrine to maintain database beside using active record class provided by CI Core? Isn't it less secure?

thank you!!

The active record class provided by CI isn't an ORM like PHPActiveRecord.

ORM classes give cool features like:
$p = new Product();
$p->where_related_category('title', 'Marbles')->get(10);
which fills $p with an array of the first 10 product entries where the related category's title is "Marbles". Isn't that awesome? (In the example "category" is a related database, "title" is a field in the "category" database, and "Marbles" is a specific entry in the title field)

No, it's not less secure if you do it right. It's slightly slower (adds about .01 seconds on my server), since it has to build a somewhat complex object, but well worth it for my purposes, especially since I cache everything large to the file system as things are entered to the database.

I use DMZ, which is built on top of CI's active record and built according to CI's design goals (low overhead, high speed, simple, etc.), and recommend it.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.