Welcome Guest, Not a member yet? Register   Sign In
CRUD Model for Codeigniter 2.0
#5

[eluser]taggedzi[/eluser]
I've been thinking about it.

Pro's to Extending CI's Core Model
1. It would be loaded when CI initializes.
2. It could be extended via other models...

Con's to Extending CI's Core Model
1. It would always be there, even when I didn't want it.
2. You would still have to manually call the "use_table" method before running any queries.

The change could be easily done... but I don't know if I would always want those functions for EVERY model, unless there is something I'm missing here...

I primarily use the CRUD model to do my "simple" queries, and fall back to a more traditional model either using direct PHP/MySQL or CI's Active records, when I need to perform more complex operations like multiple joins etc...

What are the advantages that I'm not seeing by doing it that way over my current method? (This is not rhetorical...)

I could see being able to "extend" my CRUD could be handy... but on the flip side of that I have trouble thinking of a situation that would require extending it that wouldn't be far easier using a traditional PHP approach or using CI's Active records... which I would place in a separate model...

Input is welcome... Smile


Messages In This Thread
CRUD Model for Codeigniter 2.0 - by El Forum - 05-24-2011, 11:21 PM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-25-2011, 04:00 AM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-25-2011, 10:55 AM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-25-2011, 03:21 PM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-25-2011, 04:48 PM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-26-2011, 03:31 AM
CRUD Model for Codeigniter 2.0 - by El Forum - 05-29-2011, 10:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB