12 votes

Model-View-Catharsis: MVC was a mistake

4 comments

  1. [3]
    skybrian
    (edited )
    Link
    From the article: [...] (Attention conservation notice: this programming article is written in a difficult style with obscure allusions, but it's sort of fun if you get some of the jokes.)

    From the article:

    Look at this. It's from Wikipedia so it must be true. No really, look at it closely. There is a View, which only knows how to tell you something. There is a Controller, which only knows how to manipulate something.

    This is a crack team of a quadriplegic and a blind man, each in separate rooms, and you have to delegate your UI to them? How, in the name of all that is holy, are you supposed to do that? Prisoner dilemmas and trolleys? No really, if the View is a TextField, with a keyboard cursor, and mouse selection, and scrolling, and Japanese, how is it possible to edit the model backing it unless you are privy to all that same information?

    [...]

    By materializing a mutable tree, you have made it so that now the evolution of your tree state must be done in a fully differential fashion, not just computed in batch. Every change must be expressed in terms of how you get there from a previous state. Given n states, there are potentially O(n2) valid pairwise transitions. Coding them all by hand, for all your individual Ms, Vs and Cs, however they work, is both tedious and error-prone. This is called Object-Oriented Programming.

    (Attention conservation notice: this programming article is written in a difficult style with obscure allusions, but it's sort of fun if you get some of the jokes.)

    6 votes
    1. [3]
      Comment deleted by author
      Link Parent
      1. [2]
        skybrian
        Link Parent
        Based on Hacker News comments, most other people don't get it either. He's a smart guy but he's not explaining things well here. I only half-understand it myself and would have to study harder to...

        Based on Hacker News comments, most other people don't get it either. He's a smart guy but he's not explaining things well here. I only half-understand it myself and would have to study harder to really get it, though the things I understand seem kind of neat. Maybe someone will come along and explain it better?

        5 votes
        1. undu
          Link Parent
          For the tree representing the state of the UI, and working on it incrementally here's a video explaining it: https://www.youtube.com/watch?v=R3xX37RGJKE

          For the tree representing the state of the UI, and working on it incrementally here's a video explaining it: https://www.youtube.com/watch?v=R3xX37RGJKE

          1 vote
  2. Flashynuff
    (edited )
    Link
    Oh, wow, this is great -- even though I feel like half of it went over my head. Maybe I missed it, but I wish there was an example of the concepts here in use in an application -- I feel like it...

    Oh, wow, this is great -- even though I feel like half of it went over my head. Maybe I missed it, but I wish there was an example of the concepts here in use in an application -- I feel like it would be easier to understand.

    This video was linked in the post -- it seems like it goes into more depth on "Immediate Mode" GUIs.

    edit: on reflection, I think I might understand this more. Will update later with thoughts

    2 votes