Welcome Guest, Not a member yet? Register   Sign In
How to Call private method from view?
#7

[eluser]saidbakr[/eluser]
[quote author="Colin Williams" date="1262854586"]By the time you get to the view, all this sort of stuff should be figured out. It's just bad design to get to a point where you need to display something and go, "Wait, this still needs formatting." Just do it all before the view.

By your current logic, why not just load a view with no params supplied to it and call a bunch of functions?[/quote]

My logic is meant by the application performance. The idea is "Why do I make my application to do another loop to retrieve the data where I can avoid it with a simple function?"

Any formatting, regarding the data I talked about above, in the controller side will require a looping through the result set which such loop will be repeated again in the view, so I cancel the loop in the controller and keep the loop in the view.


Messages In This Thread
How to Call private method from view? - by El Forum - 01-06-2010, 04:51 PM
How to Call private method from view? - by El Forum - 01-06-2010, 05:13 PM
How to Call private method from view? - by El Forum - 01-06-2010, 05:43 PM
How to Call private method from view? - by El Forum - 01-06-2010, 08:08 PM
How to Call private method from view? - by El Forum - 01-06-2010, 08:55 PM
How to Call private method from view? - by El Forum - 01-06-2010, 08:56 PM
How to Call private method from view? - by El Forum - 01-07-2010, 07:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB