Which Smalltalk?

When starting any project, a developer has to navigate a tree of choices. Which programming language do I choose? Which distribution? Which editor or IDE should I use with it? Which operating system should I target? Sometimes, the decision is easy since the environment is dictated by management: we’re a C# shop, so fire up VisualStudio on Windows and go. Or, we’re using Ruby 1.9, so pick your favorite code editor (TextMate, vim, Emacs, Eclipse) and you’re off, since you’re limited to pretty much one official Ruby distribution. Same with Python, or Perl — pick an editor and your favorite *nix OS (Windows support is more shaky for all these scripting languages), and you’re set. Sure, there are often experimental or alternate VMs and interpreters, but the mainstream production choice is clear.

Not so with Smalltalk. Much like with Lisp, a casual user first approaching the Smalltalk world is faced with a bewildering variety of Smalltalk versions. Which distribution and virtual machine (and therefore a slightly incompatible dialect and set of libraries) should you choose?

Fortunately, a little bit of research narrows down the choices considerably. Especially if you want to use the Seaside web development framework. Essentially, you’re faced with either Cincom’s VisualWorks Smalltalk (for a stable, powerful commercial distribution with corporate support), GemStone’s GLASS platform (Gemstone, Linux, Apache, Seaside, Smalltalk, which uses the incredible object-oriented Gemstone database for persistence), or the free open-source Squeak Smalltalk.

Let’s run down the choices that I made in starting this project.

Q: Which programming language? A: Smalltalk
I have worked with Smalltalk for over 9 years, both as my day job (writing desktop applications in Visual Smalltalk and Cincom’s VisualWorks), and as a hobby (exploring Squeak Smalltalk). Though I have also worked on commercial projects using Java, Perl, PHP, Python and Ruby/Rails, I have not found anything in those worlds resembling Smalltalk’s powerful IDE and ease of debugging. Though the other languages enjoy a wider base of developers, open source projects, and third-party library support, the experience of working with Smalltalk (and Seaside) is profound, freeing and satisfying.

Q: Which Smalltalk? A: Squeak
Although the GLASS platform intrigues me, I don’t have much experience with it. And, given a choice, I always prefer to work with open-source technology rather than commercial distributions, hence the choice of Squeak (which I feel has more long-term longevity and openness) over VisualWorks (even though that has better commercial support, I don’t want to deal with license fees at this stage in the project)

Q: But which Squeak? A: The Pharo Project fork
One slight complication is that the Squeak project forked in 2008. Although I’ve worked with “plain Squeak” for a number of years, the Pharo fork seemed like a reasonable choice, since it was chosen to be the reference implementation for the Seaside platform (perfect, exactly what I need it for).

The original reasons that I posted for choosing Pharo were:

a) removing unessential code from Squeak (Squeak, having started as a children’s education project, has accumulated a fair amount of cruft over the years),
b) clearer licensing (MIT license),
c) more frequent updates (think Ubuntu versus Debian), and
d) being a reference implementation for the Seaside platform (perfect, exactly what I need it for).

However, as this thread on Pharo-Project mailing list pointed out, most of them are incorrect. My apologies for misunderstanding — I got those reasons from the Pharo Wikipedia entry when I came across the Pharo fork, and was trying to figure out whether to switch or not.

Q: Which IDE? A: Squeak/Pharo
Unlike most programming languages, the code editor and IDE is often built into the distribution/VM (though the IDE code can be stripped out when getting a VM image ready for deployment). This may sound strange, but it buys you incredible debugging and refactoring powers. Like in Lisp, both the source code and the (on-the-fly) compiled methods and classes are first-class objects, so with a single keystroke, you can do things like “Show me a list of all the methods called from this method” or “Give me a list of all the other places in the code this function is called from” — something that has to be approximated with full-text searches in other IDEs and environments.

Q: Which operating system? A: Doesn’t matter, actually
Both Squeak/Pharo and VisualWorks are cross-platform, with the virtual machine and IDE working almost identically on Windows, Linux and MacOS X. Currently, I do development on Windows and Ubuntu Linux (depending on which machine I’m working on), and deploy to a web server running Linux.
I hope this sheds some light on this very individual set of decisions. One last thing I’d like to reiterate: If you’re new to Smalltalk and Seaside, you essentially can’t go wrong with the main 3 distributions (VisualWorks, GLASS or Pharo). All three are excellent cross-platform environments, and the choice between them comes down to commercial support, licensing fees (and, in the case of Gemstone, whether or not you need a first class object-oriented database).

Check out the an anime project solely made through Free and Open Source software click here.
To subscribe to the "Guy WhoSteals" feed, click here.
You can add yourself to the GuyWhoSteals fanpage on Facebook or follow GuyWhoSteals on Twitter.


Post a Comment

Related Posts Plugin for WordPress, Blogger...