Welcome Guest, Not a member yet? Register   Sign In
Understanding View Cells
#1

Hello everyone!

I'm working on my first project on code igniter and found it quite promising so far. I've been going through the docs and came across View Cells, which seemed quite useful on the first glance. But after going through the entire documentation I found it a bit contradicting to the MVC pattern. 

On one hand, we are supposed to make calls to Views and Models only from a Controller class, but View Cells on the other hand, suggests that the method can be called from any class- even outside Controller. The doc mentioned an example that uses a function from a different class(not controller), querying data from a model and feeding the retrieved data to a view. Is it a good practice? Doesn't this approach break the MVC pattern? If someone could help clarify, it'd be really helpful. Cheers.
Reply


Messages In This Thread
Understanding View Cells - by LeoKarun - 02-27-2021, 11:07 PM
RE: Understanding View Cells - by InsiteFX - 02-28-2021, 01:48 AM
RE: Understanding View Cells - by LeoKarun - 02-28-2021, 02:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB