Lets say I'm displaying a bunch of data (
model) using a
View class for rendering. However, a lot of the data has sub-data (
models) complicated enough to require separate rendering classes.
In my design, a
View class has a
model which it is rendering, and has many children
Views which display the sub-data. In some cases, A
View, while containing a model, may not have anything to render and serves more as a wrapper for it children.
However, if you have very complex data and your sub-views have subviews,this design results in deeply nested method calls. Some methods are simply passing information to view classes who may do nothing with it except pass it to their children. This seems inefficient, so I figured there might to be a pattern or something that solves this more elegantly.