Welcome Guest, Not a member yet? Register   Sign In
how do you organise your code so you can re-use things?
#3

[eluser]Colin Williams[/eluser]
Quote:A song list widget might appear on lots of different pages throughout the site

The operative phrase there is "appear on." Most people don't have a hard time abstracting data loading, abstracting validation, abstracting common subroutines, but yet so many choke when it comes to abstracting how content makes its way to the client. You have to think beyond "ok. I'm at my controller. Load me some data then load me a view or two." You are essentially cutting off all other actors in your application.

You might find it useful to employ a library like Modular Extensions HMVC (look it up in the wiki), but even then you are still just abstracting background processes and not necessarily what rises to the top.

I know none of this is clear or concrete (and CI doesn't come with an answer in itself), but you need to do your best to extrapolate.


Messages In This Thread
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 01:11 AM
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 02:54 AM
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 03:27 AM
how do you organise your code so you can re-use things? - by El Forum - 09-19-2008, 12:27 AM
how do you organise your code so you can re-use things? - by El Forum - 09-19-2008, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB