Are you still on the MVC boat?

Discussion in 'iOS Programming' started by Andrei Durnea, Aug 9, 2018.

  1. Andrei Durnea, Aug 9, 2018
    Last edited: Aug 9, 2018

    Andrei Durnea macrumors newbie

    Joined:
    Aug 9, 2018
    #1
    I know everybody implements the design pattern they see fit for their problem but it seems to me that in the past, apple's guideline was towards MVC.

    Maybe this will change with the next Xcode.

    In the image attached, the folder structure visible seems to have a folder/group named View Model Classes.

    Hello MVVM!

    The image was here https://developer.apple.com/ on 9/Aug/18
     

    Attached Files:

  2. TokMok3 macrumors 6502

    Joined:
    Aug 22, 2015
    #2
    MVC is a paradigm, is just a way to structure data...
     
  3. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    MVVM is the next big thing. Problem is that if you read any articles about MVVM on iOS they all start out with the same diagram but they all end up with different implementations. Some of the basics of MVVM can address the problem of 'massive view controller' on iOS by moving certain parts of code that commonly goes into view controllers into a second class. I do that in my current projects. However there's a part of MVVM called 'data binding' that has no simple clear obvious way to be implemented on iOS. There are various ways to do it but none that use simple built-in methods AFAIK.

    I doubt that Apple will deprecate MVC. UIKit is built around it. However they might provide example code that shows how they think MVVM should be done on iOS. There is strong support for data binding on macOS including classes and IB support for making connections between objects, although I haven't kept up with Mac development for a while. Maybe they could bring that support over to iOS or maybe provide a more swifty way to do data binding.
     
  4. monockk macrumors newbie

    Joined:
    Oct 9, 2018
    #4
    It depends on what kind of project you are working on. For small project, MVC is still the best bet IMO
     
  5. Shadow%20Mac macrumors 6502

    Joined:
    Dec 28, 2007
    Location:
    California
    #5

Share This Page