Dynamic Web Development with Seaside

5.3Developing in GNU Smalltalk

Developers who are already familiar with other scripting languages, for example Ruby, will have few problems adapting to GNU Smalltalk.

A relatively important difference from other Smalltalk dialects is the availability of namespaces, a mechanism for restricting the referential scope of such names. While advanced usage of name spaces can be quite involved, in practice it is relatively simple and based on a few essential points.

  • The top-level name space is named Smalltalk.
  • All classes and add-ons are defined in sub-namespaces of Smalltalk.
  • Most Seaside classes are in the namespace named Seaside.

Your application should, in general, be in a namespace that you create for your own usage. If you use the package system of GNU Smalltalk, switching to a separate namespace is actually done automatically while loading the package.

However, for simplicity especially during early development, you can define your classes directly in the Smalltalk name space.

Copyright © 9 December 2021 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.