1. 22
  1. 5

    These posts are great.

    Do you have a background in Smalltalk and/or Squeak? Squeak of course has a version of morphic which John Maloney did after the Self one. It has some improvements but personally I think it struggled a bit to be as dynamic as the Self version. (It’s interesting though that it has had staying power - both Pharo and Squeak have tried to get away from it for many years without managing to come up with something better)

    Just as some random thoughts: I’m not sure that the best way of programming morphs has yet arisen. Morphic is in a sense an attempt to collapse the MVC hierarchy in order to achieve better flexibility and directness. As such it doesn’t force you to split your model and view (or controller) in any particular way but lets you do it as you see fit. This means that a calculator morph can work just fine without a separate model which is one reason why your morph is so conceptually simple.

    For people reading along I’d recommend:

    1. 4

      Thanks for following my posts, it means a lot to me.

      Do you have a background in Smalltalk and/or Squeak?

      Not at all, Self was my first “true OO” language.

      Squeak of course has a version of morphic which John Maloney did after the Self version.

      That’s quite interesting! I don’t really know the history of Self’s evolution, but this definitely got me interested.

      both Pharo and Squak have tried to get away from it for many years

      Do you mean to say that Pharo is using a version of Morphic right now?

      I’m not sure that the best way of programming morphs has yet arisen.

      I’m open to new ideas. In my first post I mentioned that I would be working on my own implementation of Self (for fun) and I’d like to incorporate the knowledge of the past 20 years into the programming environment.

      it doesn’t force you to split your model and view (or controller) in any particular way

      I have noticed that indeed. I wonder how a MVC styled use of Morphic would look like (perhaps as the topic of a future article)?

      1. 4

        Pharo is using a version of morphic now. If you look at a Pharo image you can see the morph class etc. Pharo’s Morphic compared to Self’s is much more complex for a bunch of historical reasons, and they have tended to try to deal with the complexity by creating various layers on top of it. I haven’t looked at it for ages, but I think the current recommended layer is called Spec. Morphic is still underneath, but the idea is Spec provides a more familiar MVC interface to it.

        If you want to look at a Morphic done well in Smalltalk, I think Cuis would be the place to look. Cuis is another fork of Squeak like Pharo, but the author has focussed on trying to make a small clean codebase with a cleaned up version of Squeak’s Morphic: https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev

        I’m very interested that you have come to Self straight and not through Smalltalk as that’s the way I’ve seen other people come.

        Also looking forward to your implementation of Self :)

        1. 1

          I haven’t looked at it for ages, but I think the current recommended layer is called Spec.

          Yes. And afaik there is also Bloc and Brick.

          I’ve been playing with gtoolkit lately and I must say, that I kinda like it, but I didn’t do anything complicated yet.

      2. 1

        There was an observation from the folks behind the Apple Newton that’s stuck with me:

        You typically have many instances of model objects of the exact same structure. You typically have a single instance of a view, tailored to how it connects to the data and to the rest of the UI (controllers / view-models are ways of factoring that code out from the view). Class-based OO works very well for model objects (unsurprising given Simula’s influence in the design of those abstractions) whereas prototype-based OO works much better for view objects. I’ve not seen any other system that acknowledges this and takes proper advantage of it by design but an increasing number of HTML+JavaScript for the UI, something else for the back end, systems seem to be converging on these ideas accidentally.

      3. 1

        Very nice. Did you created your own Self syntax highlighter for the page? :)