DRM vs Active Records

Hello, I have a fully functional application in Codeigniter. I am using Active Records. Should I move to DataMapper? What will be the difference? I am interested in speed mostly, would it be any change there?

There's no do's or don'ts. You can not compare the two.

In the case of AR, you hand-craft your models, create your model methods, and in them access the database using CI's AR command set.
In the case of an ORM, you one have to hand-craft your custom methods, all generic methods to interact with the database are provided by the ORM.

Given the fact that most database interaction is pretty standard, it's my experience that using an ORM allows for much faster development, especially for bigger applications. But YMMV...

In terms of speed, every abstraction layer added will cost you some performance. Direct calls is fasted, then CI queries, then CI AR, then an ORM. You have to balance the cost of hardware (in case you would need a more powerful server) against the savings in development and maintenance of an application during it's livecycle.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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