[Cuis] Patterns
Dan Norton
dnorton at mindspring.com
Mon Nov 16 16:30:49 CST 2015
On 6 Nov 2015 at 15:28, Juan Vuletich wrote Re: [Cuis] ColorEditor updated:
> Hi Ken,
>
> On 11/2/2015 8:27 PM, KenD wrote:
> > ...
> >
> > However, class comments are not usually where design patterns show
> up. 8^|
> >
> > In the case of #when:send:to: I suggest a slightly larger
> discussion around building paned windows which update dependent
> panes.
> >
> > What constitutes good style? What code patterns help?
> >
> > Think "Useful Code Patterns" to augment "Useful Expressions".
>
> In 2009 I wrote
> http://www.jvuletich.org/LightWidgets/AnExampleOfLightWidgetsProgram
> ming.txt
> and
> http://www.jvuletich.org/LightWidgets/ProgrammingWithLightWidgets.tx
> t .
> I've had the idea of making all the GUI code in Cuis follow this
> style.
> But time is always short...
>
As one who benefits greatly from studying other people's code ;-) I favor copy and paste over
reading prose. The most useful "Useful Code Patterns" would be something in a code
window like "Useful Expressions" IMO. But where UE is code line oriented, it needs to be
class and method orented. It would be heavily commented as to what is on a line, or in a
method, and why, because this is a big problem with Smalltalk in many cases. Once pasted,
the comments would be customized or removed.
I started a package with a model and a view, trying to be minimalist about getting them to
simply put up a window without bringing up the debugger. There are lots of comments.
Please take a look and give me yours.
https://github.com/dhnorton/Cuis-Smalltalk-patterns
It tries to be the most efficient, direct, and simple pattern for opening a view on a model in
Cuis. It's deliberately not glitzy. Glitz is added by the user. Next, I plan to incorporate
#when:send:to: fundamentals.
- Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20151116/4a178960/attachment-0004.html>
More information about the Cuis
mailing list