Dynamic Web Development with Seaside

Buy PDF Buy Print

1.1What 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.

Seaside was originally created by Avi Bryant and Julian Fitzell. It is supported by an active community and enhanced by several Seaside experts. Currently, Julian Fitzell, Philippe Marshall, and Lukas Renggli (one of the authors of this book), are leading its development.

Seaside is often described as a heretic web framework because by design it goes against what is currently considered best practice for web development — such as using templates or clean, carefully chosen, meaningful URLs. Seaside does not follow REST (Representational State Transfer) by default. Instead, URLs hold session key information, and meaningful URLs have to be generated explicitly, if needed.

When using a template system (PHP, JSP, ASP, ColdFusion, and so on), the logic is scattered across many files, which makes the application hard to maintain. Reuse, if possible at all, is often based on copying files. The philosophy of the template approach is to separate the responsibilities of designers and programmers. This is a good idea that Seaside also embraces. Seaside encourages the developer to use CSS to describe the visual appearance of a component, but it does not use a templating engine, and encourages developers to programmatically generate meaningful and valid XHTML markup.

Seaside is easy to learn and use. By comparison, JSF (JavaServer Faces) requires you to use and understand several technologies such as Servlets, XML, JSP, navigation configuration in faces.config files, and so on. In Seaside, you only need to know Smalltalk, which is more compact and easier to learn than Java. Furthermore, it is good to know some basics about CSS. Seaside lets you to concentrate on the problem at hand and not on integrating technologies. Seaside ensures that you always generate valid XHTML and that all your code is in Smalltalk.

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.

The next section lists some real-world Seaside applications that you can browse to understand the kind of applications you can build with Seaside. Each of these applications allows complex interaction with the user, rather than a simple collection of pages.

Copyright © 30 April 2017 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.