Welcome Guest, Not a member yet? Register   Sign In
Models, Controllers N Bears OH mY!!
#9

[eluser]jedd[/eluser]
Well, yeah, there's that obvious circular reference in the first message you posted:
Quote:inbox_model loads mail_model

mail_model loads affiliates_model

affiliates_model loads inbox_model

I remember writing code like this before .. though in my defence, I was 12 years old, C64 BASIC didn't really provide an MVC environment, and I hadn't even heard of Dijkstra's seminal work.

What you might want to do .. is, well, you know .. NOT LOAD EVERY FLIPPIN' MODEL EVERYWHERE!

To assist you with that, why don't you, just before you load a model, check if the model is already loaded, say by calling a harmless function within same (there might be a more elegant way of testing if a class is available - I don't know - I tend to NOT LOAD EVERY .. well, you get the idea).


Messages In This Thread
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 01:44 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 02:43 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 06:33 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:04 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:09 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:22 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:33 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:45 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 07:55 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-19-2009, 08:25 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-20-2009, 09:42 AM
Models, Controllers N Bears OH mY!! - by El Forum - 08-20-2009, 06:41 PM
Models, Controllers N Bears OH mY!! - by El Forum - 08-21-2009, 08:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB