5 ms·
Another question, Smalltalk related. What I noticed in various Smalltalk systems is that there is a lot of code duplication for handling UI interactions (such
by patterns 3y ago
Another question, Smalltalk related.
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?
[1] https://dl.acm.org/doi/abs/10.1145/67449.67512 https://dl.acm.org/doi/abs/10.1145/67449.67512
- tonyg 3y agoSyndicate certainly lets you factor out some kinds of repeated behavioral patterns: I discussed in my dissertation (chapter 9 [1]) examples around cancellation, around state-machines, around observers, and around demand-matching. 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:PATTERNS https://syndicate-lang.org/tonyg-dissertation/html/#CHAP:PAT... [2] https://dl.acm.org/doi/10.1145/1119479.1119483 https://dl.acm.org/doi/10.1145/1119479.1119483 [3] https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-2017 https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-... [4] https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-2017/src/commit/0c0ff3af06d4f89dcfe582c01a476a97b3055d74/gui.rkt#L81-L95 https://git.syndicate-lang.org/syndicate-lang/syndicate-gui-...
- tonyg 3y agoThanks for the link to Interactors, by the way, I will enjoy having a look at that paper!
- patterns 3y agoMy pleasure! I found it to be a refreshing read. Thank you very much for your response. I will study your examples and read up the parts in your dissertation.