3

Reading comments here and subsequently looking here I’m wondering if I’ve been doing MVC wrong. I’ve always thought the View calls data from the Model. However I see people load model data and then call the view via the controller.

Which is right?

Comments
  • 0
    📌
  • 0
    A controller services a request from a view by pushing back a model for a view to consume.

    Controller receives request to fetch all active Contracts.

    Controller instantiates the ContractHelper who is great at that kind of thing.

    ContractHelper returns a list of ContractModels to the controller.

    Controller returns the list to a view.

    View loops through the Model and presents the Contract Summary page.
Add Comment