Welcome Guest, Not a member yet? Register   Sign In
CI's Active Record vs Doctrine vs Propel
#1

[eluser]Mareshal[/eluser]
I want your opinion about replacing CI's active record with Doctrine or Propel.

I've read many articles regarding CI + Doctrine on net.tutsplus.com and when I tried it myself after a simple query and print_r($result) I got exactly 3 pages of carried data in my browser.

Isn't it a bit too much? Could my site be safer and faster with and ORM (Doctrine or Propel) or without it?

Thanks
#2

[eluser]Phil Sturgeon[/eluser]
Security is irrelevant in your decision to use ORM, AR or native SQL. The only question is speed of development vrs speed of your application.

Developing with ORM is very fast, performance is the worst of the lot.

Developing with ActiveRecord is pretty fast, performance is fine.

Developing with SQL is a ball-ache, performance is zippy.

Depends how lazy you feel like being. Confusedmirk:
#3

[eluser]Mareshal[/eluser]
So ActiveRecord is enough for a normal application. Anyway, I am not going back to native SQL Big Grin
#4

[eluser]Aljebrini[/eluser]
Phil, that pretty well !
i read much about ORM and Doctrine .. so far am using Active records
but now doesn't Doctrine inhanced to get best preformance ?
#5

[eluser]GSV Sleeper Service[/eluser]
Doctrine is brilliant, the reason you saw pages and pages of stuff on a print_r is because Doctrine is returning objects, if you use ->fetchArray() instead of ->execute() you'll get a nice hydrated array.
The CI database 'Active Record' is misleading, it's not active record at all, it's a nice query builder and a very good database wrapper.
The learning curve for Doctrine is very steep, but it's worth putting a bit of effort into.
To get the most out of Doctrine it's worth going down one of the caching routes, I'm using memcache and it's awesome.
#6

[eluser]Mareshal[/eluser]
The best performance for me was with eAccelerator, my script is using at most 0.6MB at a time and server is not overloaded. I am checking it on a regular basis.
#7

[eluser]Aljebrini[/eluser]
GSV Sleeper Service , please tell us more about excution time required in Doctrine to execute same query in CI Acive record ??

i found more stats about this may be you will find this helpful

http://www.haughin.com/2008/02/13/optimi...plication/




Theme © iAndrew 2016 - Forum software by © MyBB