[squeak-dev] Replacing or enhancing or supplementing Morphic (was: How do I "sleep 5"?)

Christian Haider mail at christianhaider.de
Wed Mar 1 12:42:28 UTC 2023


Indeed a great topic!

Since I was curiously fascinated by UIs during most of my programmer life, I take the liberty to jump in from the sidelines.

UIs are one of the most complex parts of IT systems (with games as fore runners). 
So many different kinds of objects with so different behaviors. 
And they must all work together in an asynchronous fashion (unpredictable users/environment).
I believe that object orientation itself was invented partly to get a grip on the complexity of UIs.

If one could start fresh...
To me, layout is of central importance. 
Therefore, I would start with frames. Geometrical layout boxes made up of 4 sides (objects!). 
I would distinguish between horizontals and verticals, reducing complexity considerably.
Horizontals and verticals would be connected by constraints.
All (well most) widgets should know their intrinsic extend.
Frames would be only responsible for layout, not for nesting or event relaying (they do create and react to events though).
For example to me, a table/grid/whatever is not composed of cells, rows or columns, 
but of horizontal and vertical constraints on which widgets can orient themselves.

Events
No polling. The more host events one can use, the better. (Is it gone is squeak?)
I think that widgets should be actors with their own message queues (current hardware should be sufficient). 
UI elements can/should have also their own dynamic and independent behaviors.
This reduces interdependencies, concurrency problems and, therefore complexity.
But then you are fully in the asynchronous programming world (potentially painful paradigm shift).

There would be 'models' communicating with 'views'. I never understood controllers, I admit. 
To me, a view is the surface to the user and should be responsible for interpreting user events. 
I never had the urge to dynamically or statically replace controllers (the reason for having a separate object).
For the communication, I would opt for announcements, because they can carry real objects around. Again reducing complexity.

Direct manipulation is super important! 
THE outstanding feature of squeak must be kept and improved/enhanced.

Of course, all this is pure fantasy - science fiction...

Happy hacking,
Christian



More information about the Squeak-dev mailing list