The Heretic Web Framework

by Richard Kenneth Eng

Seaside is the preeminent server-side web framework in the Smalltalk world. Think of it as Smalltalk’s counterpart to Ruby’s Rails or Python’s Django or Scala’s Play framework. It is common to talk about Smalltalk and Seaside in the same breath, such is the strength of the association.

The best ambassador for Seaside is the book “Dynamic Web Development with Seaside,” by Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone with Michael Davies. Borrowing from Section 1.1:

What is Seaside?

Seaside is a free, open source framework (collection of Smalltalk classes). The developer can use and extend these classes to produce highly dynamic web-based applications. By applications, we mean real applications with potentially complex workflows and user interactions, in contrast to just collections of static pages. Seaside makes web development simpler and can help you build applications that are cleaner and easier to maintain because it has:

  • a solid component model and callbacks,
  • support for sequencing interactions,
  • native (Smalltalk) debugging interface, and
  • support for using AJAX and other Web 2.0 technologies.

Seaside applications are based on the composition of independent components. Each component is responsible for its rendering, its state, and its own control flow. Seaside enables you to freely compose such components, creating advanced and dynamic applications comparable to widget libraries such as Swing or Morphic. What is really powerful is that the control flow of an application is written in plain Smalltalk code.

What distinguishes Seaside from other popular web frameworks?

In summary, several aspects of Seaside’s design differ from most mainstream web application frameworks. In Seaside

  • Session state is maintained on the server.
  • XHTML is generated completely in Smalltalk. There are no templates or “server pages” although it isn’t hard to build such things in Seaside.
  • You use callbacks for anchors and buttons, rather than loosely coupled page references and request IDs.
  • You use plain Smalltalk to define the flow of your application. You do not need a dedicated language or XML configuration files.

Combined, these features make working with Seaside much like writing a desktop GUI application. Actually, in some ways it is simpler, since the web browser takes a lot of the application details out of your hands.

Continuations are the key

Seaside is based on reusable, stateful components. The key feature that supports this is called a continuation. A continuation is a snapshot of a program’s current control state. It allows you to “jump” to another execution and when you return, the current state is restored. This provides a conventional “call/return” mechanism for your web application. It can help resolve issues such as the double request and back button problems.

What about REST services?

Sometimes, you need to provide a REST API in order to support a variety of applications. Section 24.1 gets you started.

What is the current state of Seaside?

The latest version, Seaside 3.0, is absolutely rocking! It has numerous improvements, including a new architecture that sets the stage for many future advancements.

By smalltalkrenaissance

A non-profit advocacy organization whose mission is to promote and popularize Smalltalk.

5 replies on “The Heretic Web Framework”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s