Welcome Guest, Not a member yet? Register   Sign In
Calling data from a model from a view - is this a right way?
#7

[eluser]Colin Williams[/eluser]
It's not the worst thing to do in the world, but it's kinda hard to just consider it a View now. It's a View and Controller all in one. So, you've gained some things, but you've also sacrificed the whole concept of separating logic from presentation. Consider the conversation, "I need to change the way this data is retrieved, but for some reason I don't see where it's loaded in our application's logic." "Oh, that actually happens in a View file.." "Hrm, not where I expected to find business logic, but ok..."


There are many ways to "call something all the time," like employing Libraries that are autoloaded, or Hooks, or extending the CI_Controller class, or plugin systems, and on and on and on...


Messages In This Thread
Calling data from a model from a view - is this a right way? - by El Forum - 08-08-2008, 04:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB