by patterns · 3y ago · 0 comments
What I noticed in various Smalltalk systems is that there is a lot of code duplication for handling UI interactions (such as dragging or selecting objects in various kinds of views). Garnet, for instance, addresses that problem with Interactors and constraints [1].
Also, in Smalltalk, you will find countless instances of re-implemented tree data-structures e.g., package trees, class trees, UI component trees, which increases maintenance effort and makes the system less uniform than it perhaps could be.
Could Syndicate address these problems?
Besides these examples, the general facets-plus-conversational-context idea lets you factor out composable behavioral traits. Which word reminds me of the Traits of Schärli/Nierstrasz/Ducasse [2]: those Traits have proven benefits for improving reuse and reducing redundancy and bugs in Smalltalk systems. So perhaps in general what we're looking for are new perspectives on old problems - new ways of isolating and composing ideas.
Strictly on the example of dragging objects, I actually have a little demo GUI that factors out object draggability into a composable facet of behavior that can be "mixed in" to an actor representing a graphical object. See [3] and, for detail, [4].
[1] https://syndicate-lang.org/tonyg-dissertation/html/#CHAP:PAT... [2] https://dl.acm.org/doi/10.1145/1119479.1119483 [3] https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-... [4] https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-...