I am moving to MVC after years of using WebForms and I have a question about complex pages and how MVC works
I understand the controller creates a model which is passed to a view which is then displayed to the user.
If we take the example Microsoft homepage as an example (Shown at the bottom of this post) and pretend that each of the areas highlighted in yellow are separate database driven areas that are combined on the homepage and extracted by a call to the home controller / index method.
My question is about how a page such as the one presented below would construct the necessary model then pass it back to the view for rendering.
My first option would be to created complex ViewModel which contains each of the subsections (and each sub-section content) and pass that back to the view but I would think on complex pages this would get messy quite quickly.
Another option might be to use a bunch of RenderAction calls (I'm unsure if this is even correct) at each place where a subsection appears.
Perhaps PartialViews / ViewComponent may be another option available to me.
In the WebForm world I would have used UserControls each with their own logic in the code-behind page but obviously I cannot do this here (Although ViewComponents do seem similar)
So, given a complex page what is the best practice to generate a model or models and view / views in order to keep everything nice and clean.
Thanks for your advice :)
