Seaside: Your Next Web Application Framework

Seriously? A Smalltalk web framework? While you might be skeptical at first, this just might be the the ultimate developer tinkertoy.


Seaside supports continuation-based programming. In simple terms, this means that instead of having to throw away or explicitly save all local state after a web page is generated and recreating it all again on the next hit, you can pretend the web isn’t even involved. For example, a common sequence might look like:

 self showFirstPage.
 [self validate] whileFalse: [self showCorrectionPage].
 self showLastPage.

Again, this code reads almost exactly as what it’s doing: Show the first page (probably containing a form), and when the page is submitted, determine if the form elements are valid. If not, keep showing the correction page until it comes back correct. Finally, show the last page.

Now, here’s the interesting part of that sequence: showFirstPage is clearly returning a pile of HTML back to the user (using canvas and brushes like we saw earlier). But as the page is being returned to the user, Seaside notes that it’s about to execute the second line of this method and transparently arranges for the form submission to restore this method execution right at that spot. If there were any local variables, they’d also be properly restored, and while in the second loop, execution continues in loop’s test on the way back. It’s as if the Web is completely out of the way.

This also works for anchors and input fields. You can attach server-side behavior directly to the elements, and Seaside arranges for the proper execution context to be saved and restored so that the behavior works properly. For example, an HTML anchor to log out could be:

html anchor callback: [self logout]; with: 'log me out'.

The dynamically generated URL for this anchor is associated with the block of code. When the link is followed, the callback is executed, with the proper object receiver state entirely in place.

Similarly, a text input field provides a callback to save the incoming value:

html textInput callback: [:e | aValue := e].

Seaside generates a unique parameter name for each element, and associates this particular callback block with that parameter name. When the form is submitted, the value is automatically de-entitized and passed in to the block, which is then copied to a local or instance variable of your choice. This is actually the lowest level of the mechanism; other frameworks live on top of this to make it even simpler to associate entire objects with form elements representing their instance variables with customized editors.

The key thing here is that you never need to figure out the name of your intra-application URLs or params, or how to save your state. Seaside just manages all of that for you.

During development, unhandled exceptions land you in the debugger, as described before. But you can use this continuation mechanism to solve the “unhandled exceptions in deployed code”, too. Simply write an exception handler that notifies the user that “something went wrong, but don’t worry, we already know about it”, store the debugging URL into your favorite bug tracking system, and tell Seaside to “persist the objects for this hit a bit longer than usual”.

Now, when you come in in the morning, you can review your bug track log, and see that you had two unhandled exceptions overnight. To debug, just follow that URL in the bug report, and you’re in the precise conditions (live debugging once again) from a hit from the night before. Marvelous.

Persistence and Scaling

Any non-trivial webapp needs to have persistent data, and scale well.

If your existing data is in a traditional SQL database, the open source GLORP object-relational mapper can be used to map objects onto database rows, generating 90 percent of the SQL directly for most applications. Cincom is building an ActiveRecord-style layer on top of GLORP, allowing much of the GLORP “glue” code to be autogenerated, provided your database follows some familiar conventions.

However, if you’re building your application from scratch and don’t need to interface with existing SQL databases, you can use various object persistence layers to avoid having to “rectangle-ize” your data. Squeak can easily save an object tree as a file, for example, and reload it later.

For larger solutions, the open source Magma package allows a client-server object store, using remote object calls to search for, retrieve, and update objects to and from files. The object store can be shared among multiple Seaside processes, even running on separate machines.

For really big solutions, the GemStone/S server is essentially a database that uses Smalltalk as stored procedures. When GemStone/S is running Seaside (as a stored procedure!), the created objects simply persist as if by magic and everything can be distributed and have high-availability fail-over. One example of a GemStone/S application involves 1.5 billion objects accessed by 150 offices all over the globe.


Seaside has an active development community, including developer and end-user mailing lists, IRC channels, and websites. Seaside packages include most modern AJAX toolkits (such as Scriptaculous and jQuery), and provide support for data meta-modelling (Magritte) and content management (Pier). You can even get free hosting for your Seaside application at seasidehosting.st. (Some restrictions apply, of course. See website for details.)

For more information on Seaside, visit the primary website at seaside.st. You’ll find FAQs and tutorials linked from there, and some interesting success stories.

Comments on "Seaside: Your Next Web Application Framework"

This plan detoxifies and trims your body at the same time, without sacrificing nutrition.Here is my blog post: suco detox pronto

Usually posts some pretty intriguing stuff like this. If you are new to this site.

Just want to say what a great blog you got here!I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

Specialists necessary, specifically when you are first learning to use pc or google tv raging waters discount coupons Ankou used arrive in a cart drawn by 2 horses to grasp the spirits online deals Rhonda Byrne is an Australian born television producer as well as ghost writer discount school supply coupon You’ll need to be reminded to water your garden discount websites There was to try it out discount Shopping Online If you would like you can purchase sheet music books, however the focus this site is digital written music coupon codemy site: hotel discount codes

Very handful of web-sites that transpire to be in depth beneath, from our point of view are undoubtedly nicely worth checking out.

Always a massive fan of linking to bloggers that I love but don?t get a whole lot of link like from.

Below you will locate the link to some internet sites that we think you’ll want to visit.

Hello! I’m at work surfing around your blog from my new iphone!Just wantwd to saay I love reading your blog and look forward to all your posts!Carry on the outstanding work!Here is my bpog skip hire st albans (http://www.scribd.com/)

Although websites we backlink to beneath are considerably not connected to ours, we really feel they may be in fact worth a go through, so have a look.

We prefer to honor several other world wide web internet sites on the internet, even if they aren?t linked to us, by linking to them. Below are some webpages worth checking out.

Very handful of web sites that come about to be detailed below, from our point of view are undoubtedly very well worth checking out.

The time to read or visit the subject material or web-sites we have linked to below.

Hey there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains.If you know of any please share. Appreciate it!Here is my weblog … firma transportowa

Wonderful story, reckoned we could combine some unrelated data, nevertheless actually worth taking a appear, whoa did one particular discover about Mid East has got extra problerms at the same time.

Always a major fan of linking to bloggers that I appreciate but do not get a good deal of link like from.

Please check out the web-sites we follow, which includes this a single, because it represents our picks in the web.

Check below, are some absolutely unrelated web sites to ours, on the other hand, they may be most trustworthy sources that we use.

Here are several of the web pages we suggest for our visitors.

Always a massive fan of linking to bloggers that I appreciate but don?t get a good deal of link enjoy from.

Wonderful story, reckoned we could combine a couple of unrelated data, nonetheless definitely really worth taking a search, whoa did a single understand about Mid East has got far more problerms as well.

I got this webb page from my pal who informed mee regarding this website andd aat the moment tuis time I am visiting this site and reading very informative content at this time.My homepage; Skip Hire Brackley

We prefer to honor many other net websites on the internet, even though they aren?t linked to us, by linking to them. Under are some webpages worth checking out.

Here are some hyperlinks to internet sites that we link to due to the fact we assume they may be worth visiting.

Here are some links to sites that we link to for the reason that we believe they’re really worth visiting.

The facts talked about within the article are a number of the ideal readily available.

We like to honor several other web internet sites around the net, even though they aren?t linked to us, by linking to them. Below are some webpages really worth checking out.

The information mentioned within the report are a number of the top accessible.

Below you will come across the link to some internet sites that we assume it is best to visit.

Always a big fan of linking to bloggers that I like but do not get quite a bit of link love from.

Here are some links to internet sites that we link to mainly because we assume they’re really worth visiting.

Although internet websites we backlink to below are considerably not associated to ours, we really feel they may be really worth a go through, so have a look.

Leave a Reply