saush

Seaside, Squeak and Smalltalk

Posted in Seaside, Squeak by sausheong on November 12, 2006

I had an interesting chat with Nick last week and he mentioned the concept of continuations to me. One thing led to another and soon I was mucking around with an web application framework called Seaside. Seaside is quite a different type of web application framework from what I’m used to (J2EE-types, Struts, Webwork or even Ruby on Rails). For one it’s a continuations-based web application framework. Also, it’s a web application framework built with Smalltalk. Yes, Smalltalk.

That’s a language I’ve not heard for a long time. I remembered learning about Smalltalk last during my university days and not much about it since. Smalltalk, for those uninitiated, is the granddaddy of all object-oriented languages, first introduced about 35 years ago in 1971 but really made it as a programming language as Smalltalk-80 (in 1980 of course). It’s the first language that has the ‘everything is an object’ paradigm. Seaside runs on a couple of variants of Smalltalk but the one that I used is Squeak. Squeak, derived from Smalltalk-80 is an open source Smalltalk variant developed originally by Apple programmers in 1996 and currently has an active development community.

But what’s so special about Seaside besides being a web application framework done in a niche programming language? Without going into the details (that’ll take a lot of writing), Seaside provides some interesting features that I’ve not seen in any other web application framework I know. For example, Seaside encourages developers to create web applications with a macro view of the application flow instead of individual page flows. Web applications are made from highly re-usable components (really Smalltalk objects) which are not tied to the flow of the application, can have its own control flow, its own state and contain can other components. Seaside allows developers to model application flows in a single piece of code compared to modelling it in disparate HTTP request handlers (think servlets in J2EE or action classes in Struts or controller methods in Rails). Frameworks like Struts or Webwork tries to model this kind of flow in static XML configuration files, which is at best, a hack. Rails tries to do this in its own code by convention, which is a good attempt but the way Seaside does it is the best I’ve seen so far.

Seaside is full of interesting bits and pieces done by various members of the Seaside community, which I’m just barely touching the tip of the iceberg. Ajax is supported through the inclusion of Scriptaculous, the incredibly useful library by Thomas Fuchs. Connectivity to relational databases like MySQL and PosgresSQL is available, though connecting to object-oriented databases like GOODS is more natural. There are also OR mapping libraries, and all the normal stuff you’ll expect from a web application framework.

However Seaside is not all a bed of roses. Firstly if you’re like me, coming from a mainly C++ and Java background, you’ll find Smalltalk a challenge to even read (though you can try ‘I Can Read C++ and Java But I Can’t Read Smalltalk‘). The Squeak environment is Windowed and GUI, which is familiar but not so familiar. The environment is based on the concept of ‘images’ that are snapshots of the entire environment. Development is through a built-in Systems Browser and incredibly also at the web browser (I kid you not) which fascinated and freaked me out a bit initially. But like most new tools, once you get used to it, it becomes more natural and comfortable.

I’ll be doing more write-ups on Squeak and Seaside in the next few blog entries. Stay posted!

Some good links to learn about Seaside besides the official web site.

About these ads

8 Responses

Subscribe to comments with RSS.

  1. Smalltalk said, on November 12, 2006 at 7:29 pm

    Saush.com over Seaside…

    Op saush.com staat een uitgebreide post waarin het verschil tussen Seaside en andere webframeworks in java en ruby wordt uitgelegd. De schrijver belooft nog meer artikelen over Seaside te schrijven, dus wel een blog om even in de gaten te houden.

    ……

  2. [...] Here’s a nice quote from a Java/Ruby programmer’s recent blog entry on Seaside… [...]

  3. mj said, on November 13, 2006 at 1:59 am

    “you’ll find Smalltalk a challenge to even read”

    Check out this pdf too: http://www.jera.com/techinfo/readingSmalltalk.pdf

    I would also recommend installing Shout (available via SqueakMap) to help in your learning. Shout is the Squeak answer to intellisense: it does name completion and shows you a list of messages that a given object responds to using ctl + space. It’s also very well integrated into Squeak: if you right arrow on a message it will show you the source, and if you right arrow again, it will open a System Browser to that method’s code.

  4. sausheong said, on November 13, 2006 at 2:05 am

    Thks mj for the link, and the tip. Will check them out!

  5. mj said, on November 13, 2006 at 8:35 am

    I need to correct my previous statement: Shout does syntax color highlighting. It is eCompletion (http://uncomplex.net/ecompletion) that adds the intellisense behavior.

    Sorry about that–I’m learning Squeak myself.

  6. ster said, on November 16, 2006 at 12:20 pm

    The link to ‘A Day at the Beach – Exploring the Seaside Web Application Framework for Squeak Smalltalk’ above points to the same Ducasse paper as the ‘Seaside – A Multiple Control Flow Web Application Framework’ link.

  7. sausheong said, on November 16, 2006 at 11:55 pm

    Thks for the tip. I changed that.

  8. Object-Oriented Databases said, on October 8, 2011 at 3:10 pm

    [...] Seaside, Squeak and Smalltalk « saush – I had an interesting chat with Nick last week and he mentioned the concept of continuations to me. One thing led to another and soon I was mucking around with an web application framework called Seaside. Seaside is quite a different type of web application framework from what I’m used to (J2EE-types, Struts, Webwork or even Ruby on Rails). [...]


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 449 other followers

%d bloggers like this: