Seaside
Seaside provides a layered set of abstractions over HTTP and HTML that let you build highly interactive web applications quickly, reusably and maintainably. It is based on Smalltalk, a proven and robust language that is implemented by different vendors. Seaside has been ported to every major version of Smalltalk, but they use the Pharo flavour which is a fork of Squeak.
Based on continuations, Seaside transparently manages the request/response loop and the handling of the necessary URLs, query strings and hidden form fields. This prevents any name clashes and frees the developer from manually encoding information in the response and decoding it later again. This is the foundation to model the control flow explicitly at a higher level of abstraction rather than having to hardcode the next step of flow in each component itself.
In Seaside, each component can run its own control flow independently of the others. This makes possible to compose complex applications out of small and reusable components without having the problem of composing the individual control flows. This component composition makes possible to have multiple control flows within the same page naturally. The programmer is able to write business application logic at a high-level of abstractions.
Contents
Advantages over other web technologies
Many of today's frameworks, such as PHP, ASP.NET, JSP or Zope, fail to provide a high-level abstraction over how pages are linked. Indeed, a web application has to model control flow.
IDE: As Seaside is written in Smalltalk it is based on a very powerful, fully object-oriented language and development environment. In addition to being able to use the tools provided by the environment, Seaside integrates them seamlessly with the web. This makes the platform a versatile and productive environment for web application development. We start by looking at the debugging facilities before presenting the Seaside specific tools.
Incremental programming: Smalltalk’s philosophy of incremental programming in an interactive environment is supported by Seaside. Code can be added and edited while the web application is running and there is neither the need to manually recompile the code nor to restart the server. In many cases this makes it possible to update a system in production on the fly without any outage and without the need to set-up a temporary backup server.
Debugging: Debugging. Most of today’s frameworks do not support debugging of web applications well. Most display the error and the line number in the web browser only, which makes it very inconvenient to find and fix bugs.
Toolbar: Toolbar. A toolbar that is shown at the bottom of the web-application during the development phase enables the programmer to access additional tools from within the web. Of course, all these tools have been written in Seaside itself.
Halos: When enabling the halos, every component gets surrounded by a thin grey line and a header giving the class name of the component and a set of buttons to run tools and to change the viewing mode.
System Browser: opens an editor on the current component and lets the developer modify its class and all the methods from within the web, while the application is still running in the background. When closing the browser-view the application immediately runs with the new code without having to restart the session.
Inspector: opens a view on the component, so that the developer can browse the internal structure of this object. It presents the names of the instance variables and the current values, whereas the user is able to dive into the referenced objects by clicking on the links.
Library Browser: opens an editor that lets a UI designer tweak the associated CSS. This makes it very convenient to try out different layouts directly in the web-browser without leaving the running application.
Source View: provides a pretty-printed and syntax-highlighted XHTML view onto the source code of the current component. Like this the developer is able to observe the generation of XHTML while still being able to interact with the application by clicking on its links.
Integration of Seaside with OpenCobalt
There is development due to start soon for integrating Seaside with OpenCobalt. The aim of the integration is mainly oriented toward allowing web-browsers and mobile devices to participate in the 3D environments. They've also expressed an interest in making this integration process as reusable as possible so that integration of other applications and processes is easy. We're still very new to Squeak and Cobalt, so some of these ideas may already be present in the existing structure, or require only minimal integration.
Standardisation
The plan is essentially to make the Cobalt environment more widely available by allowing external environments to participate in it. Making all access to the 3D data structure occur via API would allow external contributors to have the maximum ability to participate, and would even allow participation from within alternative 3D rendering environments.
The API would ideally make the 3D environment data structure would be accessible for querying, changing and communicating its data as a standard object model, for example being a DOM structure at run-time and an XML-RDF file for storage and transport. This would allow local apps such as robots or
Separate functionality of viewer from the viewed data structure. Spilt into a standard ontology for the data, with 3d specific aspects being in a cobalt sub-layer (explain). All manipulation of data is done via an API, so that any user can do all things (non) cobalt user can do. The viewer (3D) which is separated out, should also have an API which allows 3D snapshots/video of views to be requested.
- Cobalt 3D group participation and querying and rendering to images and videos via standard API (generic multi-format query/export engine)
- Changes required to reconstruct/play/view the 3D group can be subscribed to via standard channels such as RSS
Using these two features, many other applications can integrate and extend the basic environment. The application we at OD have in mind is a generic workflow interface for building organisational systems. The foundation of our proposed system is a P2P network of objects and relationships (eg semantic triple-space) which forms a persistent coherent context for all the organisations, groups, projects etc that the peers are engaged in.
- Squeak/Cobalt objects composing 3D spaces exposed via API
- DHT-based persistence and permissions layer bolts to API
- Eventual persistent layer can be added to for intermittent connectivity
- persistent objects shared amongst groups unify groups into a single ontology
- Access to the storage layer is done via API so that browser or 3D participation are both views onto the same data via the same interface
- anything that can be done from Cobalt can also be done through the API
- Seaside makes Squeak and object access available from browser environment
- anything that can be done from Cobalt can also be done from browser
- objects in the network are class/instance so that patterns can be re-used and refined etc
Resources
- http://onsmalltalk.com/top-posts
- Design principles in Smalltalk
- Smalltalk 101 - good list of resources
See also
- Seaside - a multiple control-flow web application framework - PDF doc about Seaside by Stéphane Ducasse, Adrian Lienhard and Lukas Renggli
- Seaside for Java - these guys rock! they hate Java and take the piss out of it just like we do :-)
- DabbleDB - DabbleDB is a very impressive online rdbms-like app written in Squeak
- DabbleDB - Creator of DabbleDB on persistence in smalltalk, Seaside
- Rails vs Seaside - by Ramon Leon - 22 January 2007



