Welcome Guest, Not a member yet? Register   Sign In
code reuse: wich is the best approach for sharing controllers and views between different projects?
#1

[eluser]Bad Penguin[/eluser]
I'm thinking to migrate a wordpress blog network to a custom app created with C.I.;
the main advantage will be that i'll be able to control everything from a unique DB
and of course speed: 1 query to render a page instead of like 100 queries that WP does :-P

To do that i wish to reuse as much as possible the source code of controllers and views:
wich is the best approach to do so?

For views i was thinking to use a config variable to choose a theme/layout, so my default view will be something like /application/views/$myvar/homepage.php
I've only 3 layout out of 30 domains.

For controller looks way more complicated, it seems that everything must be created inside /application/core/MY_Controller.php and then in every domain i extend this core class with the small adjustment i need for each domain.

What do you suggests?

Thanks, Antonio :red:


Messages In This Thread
code reuse: wich is the best approach for sharing controllers and views between different projects? - by El Forum - 07-16-2012, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB