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

[eluser]compoundeye[/eluser]
Hello,

I'm working on a site for a music/art/engineering project.

The database has a small number of tables:
Quote:
song
composer
rating
performance
Each table has a model object

Information from these different tables appears in different places throughout the site - for example:

A song list widget might appear on lots of different pages throughout the site

I'm assuming that i don't want to put all the query and formatting code in the controller and a single full page view, as I'll only end up copying and pasting it into other controllers and views

In the past I've used libraries that used lots of little mini views that were put together to make a page.
But maybe there's a better way?
What do you do when you know you'll want to use a piece of data and formatting in lots of different parts of a site?

Thanks for your help

mathew


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