Welcome Guest, Not a member yet? Register   Sign In
Replace Code Igniter's database layer with Doctrine 2
#6

[eluser]WanWizard[/eluser]
Any ORM is always slower than CI's simple abstaction layer, which in turn is slower than writing your query's manually and calling mysql_query() directly.
There is simply much more code involved to construct and execute the query. There are files (models) to be loaded, classes to be instantiated, etc.

The quickest code is the code that doesn't have to be executed (well, not entirely true, the quickest code is the code that isn't there...).

What you gain in flexibility, standardisation and easy maintance, you loose in speed. This is true for any time of abstraction. It's up to you do judge which is more important. For me, ORM for the application is a no-brainer, development is faster, and application maintenance takes a lot less time. Definately outweights coding by hand. And the cost of a bigger server (due to the performance loss) is in most cases much less then the extra development cost of maintaining an app with hand coded queries all over the place.

For "internal" stuff, I don't think so. There is no gain to rewrite the session library to use an ORM model. It's set-and-forget, you only create a maintenance issue when you want to upgrade CI at a later stage.


Messages In This Thread
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-17-2011, 11:39 AM
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-17-2011, 12:09 PM
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-18-2011, 05:43 AM
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-18-2011, 10:48 AM
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-18-2011, 11:01 AM
Replace Code Igniter's database layer with Doctrine 2 - by El Forum - 01-18-2011, 04:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB