MVC

what is MVC

  • M - model

    • we can simply think models as our data layer. basically structure of our data.
    • for example, lets have a user model. it has things like first name, last name, email, phone number etc.
    • we can create model a either using struct or class.
  • V - view

    • things that we can see on our device.
    • for an example text fields, buttons and labels.
  • C - controller

    • controller work as the middle man of your view and model
    • when view trigger particular event, controller listen to those events and got to the model and retrieve any data if needed.
    • controller is the one in charge that make sure things are connected end to end.
  • in UIkit they have combine view and controller and create the ViewController