Welcome Guest, Not a member yet? Register   Sign In
Best Practice for conditional code and looping
#3

[eluser]James Gifford[/eluser]
I think that a true MVC approach requires absolutely no view data within a model. The model should simply retrieve information from the data source and pass it to the controller. The controller then can then make whatever modifications are necessary to the data before passing it to the view. There's nothing wrong with having conditionals within the view, I'd just try to avoid any data manipulation at that point.


Messages In This Thread
Best Practice for conditional code and looping - by El Forum - 05-16-2008, 09:23 AM
Best Practice for conditional code and looping - by El Forum - 05-16-2008, 09:36 AM
Best Practice for conditional code and looping - by El Forum - 05-16-2008, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB