Think small
As the topics in this section emphasize, a primary goal of any object-oriented environment, including VA Smalltalk, is reuse, for which thinking small is fundamental. The smaller you make the components of your applications, the more opportunity you have to take advantage of reuse.
Based on Smalltalk research, the average size of your methods should be approximately six to ten lines. A larger average size may indicate poor object-oriented design and a tendency toward function-oriented programming.
Likewise, the average number of methods per class should be approximately twelve to twenty, and the average number of instance variables per class should typically be less than six. Larger averages may indicate too much responsibility in too few classes.
Looking at VA Smalltalk visual part classes specifically, these numbers generally vary depending on the complexity of the class. Less complex visual part classes that take full advantage of pre-written reusable parts typically have a lower average number of scripts per class. All visual part classes average close to zero instance variables because most everything they need is inherited by default from AbtAppBldrView and other classes internal to VA Smalltalk.
Applying the design strategies covered in these sections and gaining experience should help you achieve these averages.
Last modified date: 01/29/2015