Welcome Guest, Not a member yet? Register   Sign In
Multiple Instances of the Same Module?
#1

[eluser]sean_THR[/eluser]
Let's say, for example, that I have created a model, view, and controller for displaying website news. If I later want to implement a second news module on the site that follows the same logic but resides at a different URL and pulls data from a different MySQL table, what is the best way to accomplish that?

I know that I could simply duplicate the files and modify the queries, but that will become a hassle to maintain since I will need to modify the code twice(or three, or four times, etc. depending on how many instances of the module I want) whenever I make a change.

So, any suggestions for a DRY way to do it?


Messages In This Thread
Multiple Instances of the Same Module? - by El Forum - 01-05-2011, 10:06 PM
Multiple Instances of the Same Module? - by El Forum - 01-05-2011, 11:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB