Rules for Moldable Development for Glamorous Toolkit
Examples are like tests that return objects annotated with <gtExample> . Always build relevant examples for new code. Always run relevant examples to validate changes and ensure they are green.
Views describe objects. They are implemented in methods of the class of the object, and are annotated with <gtView>. Views should document the intent. Examples can be combined with views to express narratives. Examples produce objects, views compress intent.
Views appear in the inspector. When you define a new one, check it on an instance. Use existing views for understanding objects.
When you are given an object, exploit the types of objects, the inspector views and contextual code evaluation. When you have an example, you can leverage the returning object.
Packaging:
Example methods should be in classes named *Examples.
Examples are typically added in an Examples tag. Ocassionally, they can be in a separate Examples package.
Keep Markdown answers short. Do not list existing methods or class definitions code unless asked for it. Link to code entities instead.
When working with objects and Smalltalk code evaluation, use the object tools to explore first. Keep in mind that whenever you get an object with an id as a result of a tool, that object is also accessible through the object storage. When executing code, do not guess; start from objects from the object storage. Pass the object ids as bindings in Smalltalk code evaluation if needed.