Hi guys. You often read about “purists” saying that the View must be as simple as possible and detached from everything else, but I wonder if any of them has ever written a genuine complex report.
I can totally understand that you want to keep your "final view rendered to the browser" as lean as possible. But in the process of getting there, I often have horrendous views calling many other - using multiple CListViews to tunnel through 4 or 5 tables.
You cannot always just tunnel through these tables using Relational Query in one model, because their criteria are often very complex and conditional. And some of them are complicated ‘tree’ tables that need to be tamed by large behaviors that need their own separate arguments.
All this code is not something that you "quickly do in the controller" or in any single model. However, the views being spit out by the different CListView widgets are "the perfect place in the flow of the process" to work on the "next required tables" - via their own models and behaviors.
Also, I don’t want to put this code in the controller because my controller is very generalized and dynamic - enabling me to re-use the same controller for all my models. (This saves tons of work - so changing this is not an option.)
So how do you keep your views lean in MVC?
Isn’t the final code “rendered” to the browser lean and simple - regardless of how many complicated views were used to render it?
Is that why MVVC has a separate view-model?
Any thoughts? Thanx.