Saturday, 20 September 2008

Seaside History

There are a lot of questions around the origins and evolution of Seaside, particularly after Avi and I gave up our old domain and the old Seaside and Seaside 2 websites with it.

A couple of months ago, I began (but never finished) a history page for the Seaside website to provide some background information for those who are interested. I had to dust off some of those notes to prepare my ESUG presentation on the past and future evolution of the framework and figured I might as well dust off the history page as well. So here's the story as best as I can recall it (and by "recall", I mean "find in Google" because Google seems to hold the majority of my memories these days).

[Update: now posted at seaside.st/about/History]

Introduction

Seaside made its public debut (version 0.9) in an announcement to the squeak-dev list on February 21, 2002. Avi Bryant and I developed Seaside to support our web application development consulting, specifically the development of a web-based theatre boxoffice sales system.

Seaside took heavy inspiration from Avi's Iowa framework (now here), which was written in Ruby and was itself inspired by NeXT's (and then Apple's) WebObjects. This first release of Seaside provided action callbacks for links and forms, session state management with support for call/return and the back button, and a component system with templates.

Experimentation

Almost immediately after the release of 0.9, we began work on Seaside 2.x (codenamed Borges, a reference to Jorge Luis Borges' short story The Garden of Forking Paths and an allusion to Seaside's support for forking session states). Seaside 2.0 was essentially a complete rewrite with a layered architecture: a Kernel layer providing a continuation-based HTTP request/response response loop and state (back-)tracking; a Views layer providing action callbacks and a rendering API for generating HTML; and a Component layer providing call/return semantics, embedding, and development tools.

Seaside 2.0 was released in October, 2003 with the templating system conspicuously absent. This was an experiment to see whether the development of the HTML rendering API and the wider acceptance of CSS had reduced or eliminated the need for templates. The new layered architecture made it easy for others to experiment with developing their own template engines. Seaside was also ported by Eric Hodel to Ruby, where it kept the name Borges.

Several versions followed in quick succession with major refactorings to the session state tracking and backtracking mechanisms. Seaside 2.3 (mid-2003) also introduced an even more layered architecture that tried to make some of the internals clearer and more accessibly to the project's growing number of users and contributors. It also confirmed that Seaside would not have built-in templates in the near future. Seaside became increasingly well-known around this time with a presentation at ESUG 2002 by Lukas Renggli and Adrian Lienhard and a hands-on development workshop at Smalltalk Solutions in 2003 by myself and Avi.

Stabilization

Seaside 2.4 and 2.5 addressed some growing pains in some of the core parts of the system: the Renderer API, collapsing under the weight of combinatorial explosion, was replaced by the now-familiar Canvas API; and some of the internal workings of the Session object were reified to make its application main-loop metaphor more obvious. Version 2.5 also saw the introduction of Component Decorations, Halos, and response streaming.

As first I and then Avi began to work full time developing applications using Seaside, the community began to carry more of the development load, with the release of Seaside 2.7 being  entirely (and very successfully) managed by the community, with Lukas, Philippe Marschall, and Michel Bany leading the effort. This release focused heavily on cleaning up the code base by fixing, deprecating, refactoring, and removing code.

Tuesday, 16 September 2008

Teaching a nation how to wave (part 2)

Ok, so it's been rather a long time since I ended Teaching a nation how to wave (part 1) with a "to be continued..." China already feels so far away that I barely remember where I wanted to go with that series but here we go anyway...

The Beijing Olympic Games were not the party I was hoping for. This is not to say it wasn't interesting (it was), nor that it was the fault of the security measures (it wasn't) or the Chinese organizers (not sure). For all I know, the Olympics are never as much of a party as you would expect. When Vancouverites put down our own Olympic bid as a waste of money, though, I countered that it was like throwing a house party: of course you'd rather go to somebody else's house party and avoid the costs and cleanup but eventually it comes your turn to step up and host one of your own.

And yet, while there were more people on the subways, more accreditation-pass-sporting foreigners on the bar streets, and Olympic sponsor booths scattered here and there, on the whole, life outside the sports venues seemed to be largely business as usual. The athletes (and those who could afford to drop $400 on a one-night admission) could seek out one of the many national houses or embassy-sponsored functions. But the rest of us were left to the usual collection of bars and restaurants, now lined with flat-screen televisions and sporting 15% surcharges to cover "the increased costs of food and labour" during the Olympics. I can't help thinking that if each country opened their national houses and threw a big party (much as the Dutch Heineken house did nightly) even just once during the event the atmosphere might have been a lot more festive.

That said, the atmosphere at the sporting venues was often electric. Because of the large number of individual competitions combined into a single ticketed session, many people either arrive late or leave early rather than sitting on hard bleachers for 6 or even 8 hours (way, way, way too much tennis for one go). But when the Chinese athletes were competing you could count on a pretty full house. I imagine that for many of the spectators, attending a major sporting event would have been a novel experience and the Beijing Organizing Committee had been circulating instructions on how to perform various "suggested" cheers. There were also cheering squads with bright yellow shirts scattered throughout the stadiums to provide guidance. The main cheer, quickly adopted (and adapted) by foreigners from all countries was a rhythmical four-beat chanting of zhongguo jiayou!, which means, basically, "Go China!".

At one particular basketball session, the stadium quite full of Chinese fans awaiting an upcoming game, a rowdy group of Russians behind us was trying to initiate a Mexican Wave (first time I've heard it called that) in support of their team. A few tentative participants at first. Then a few more. Maybe a section now. A few sections. Finally, after 8 or 9 attempts, the first wave trickles around the stadium, picks up a few more people, builds a little momentum and completes several more rotations before petering out. The slightly surprised but enthusiastic looks on the faces of people around me are contagious...

Several more attempts were made with limited success. These attempts are (and I have never seen anything quite like it) best described as "square waves". Each section seemed to stand up en masse, cheer, and sit down. Only then would next section do the same. The result is a sort of pulsing roar that is really quite off-putting. By the end of the Olympics, however, the stadiums full of fans were waving, clapping, and stomping their feet to "We Will Rock You" like they had been attending NHL hockey games since before they could walk. And when the Wave got started, not only could you see and hear it, but you could feel its energy passing over you: the roar would come barreling towards you and almost literally pick you up out of your seat. Teaching a nation of 1.3 billion people how to wave? I'd call that mission accomplished for the Olympics.

Thursday, 28 August 2008

ESUG 2008 Presentation

I'm in Amsterdam and just finished my ESUG 2008 presentation on the evolution of Seaside this morning. The gist of the talk was that Seaside has evolved through Experimentation, Stabilization, and Optimization and is enjoying a bit of an Adoption phase which should be encouraged. Sort of a call to arms.

I also took the opportunity to try to communicate the architecture and key metaphor of Seaside through illustrations. Finally, I rounded it all out with a few examples of less obvious (read badly documented) places people might consider extending the framework.

I think it went pretty well overall. I had a few people come up afterwards saying either that it had helped them understand some part of Seaside, that the historical perspective was interesting, or that they agreed with the need for documentation and advocacy.

I imagine James Robertson will post video on his blog at some point as he was filming all the talks. In the meantime he's posted a quick summary (wrong title and name spelled wrong, though! :) ). I'm guessing the slides will be available on the ESUG website sometime soon but I'll post them if not.

Update: Slides are available here.

Sunday, 10 August 2008

Teaching a nation how to wave (part 1)

Friday was a national holiday, declared only days in advance in recognition of the Olympic opening ceremonies. My poorly judged trip to Tiananmen Square that day revealed more people than I have ever seen in one place in China. Flags, stickers, and headbands were being sold, purchased, and worn everywhere I looked. The Olympic excitement seemed to have finally hit.

Trying to get home, I eventually give up on taking the subway after finding stations closed and streets blocked off at every turn. With the heat finally getting to me, I fall into a taxi (the best 30 quai I ever spent!) and head for home. All of a sudden, the driver is trying to talk to me. We manage to communicate that I come from Canada and he from Beijing. He pats my leg and says jianada a few times with a big grin on his face. I try out jianada yo shan yo shui (Canada is beautiful, literally: there are mountains and there is water), messing up the pronunciation but earning a smiling correction from him instead of a disinterested grunt. Finally, he rests his hand on my arm, rubbing my arm hair between his index finger and thumb. As I'm beginning to find this creepy, he starts miming shaving his face. Now I get the joke! I mime back that it may be stinking hot in China but in Canada I need this fuzzy layer.

Heading to a bar to watch the opening ceremonies, I carefully write out the chinese address, copying it character by character from a book. I hop in a taxi and the driver studiously examines my scrawled lines, picking out the characters he recognizes and piecing it together. Finally, he gets it. He turns to me and mimes, "Did you write this?" Yes, I laugh. Hen hao, he smiles (very good) and gives me a thumbs up.

It seems the city is suddenly filled with high spirits and friendly good will. The drive to the bar is the quickest I've ever experienced, despite two of the four lanes being set aside for Olympic vehicles; apparently residents were asked to keep off the roads. The street is lined with police officers and vehicles and, at every intersection, bus stop, on-ramp, off-ramp, and pedestrian overpass, a soldier in dress uniform stands at careful attention. Beijing is about to throw a party and everything seems to be ready.

(to be continued)

Friday, 1 August 2008

Random Thoughts

I'm not quite sure what to write today so it will be a bit of a stream of consciousness.

I saw a man on a subway platform today repeatedly slapping a woman (presumably wife or girlfriend) in the face. It was truly horrifying. I thought we were all supposed to be desensitized by violence in movies, games, and the news but the sheer brutality of it was absolutely shocking. I mean this is something I have literally never seen before in my life. Hours later, it still makes my blood flash boil thinking about it. All I could think to do was to start screaming at this guy in a language he didn't understand, indicating by gestures that he could try it on someone else, but the subway doors had closed and all I could do was grimace and talk myself out of taking the next subway back. Apparently domestic violence is a big problem in China.

Only three weeks to go before my departure from China and (much like my last job) I don't really want to stay but the departure is still sad. I won't miss the slow, spotty Internet. I won't miss ordering bottled water. I definitely won't miss the pollution or the heat. I won't miss the one channel of English propaganda on television, or the staring, or the spitting, or the manually controlled traffic lights that don't give pedestrians enough time to get across the road, even if you get a head start before they go green.

What will I miss? I don't exactly know. I'll miss the cheap taxis and cheap beer. I'll miss the variety of food choices (at least compared to where I'm going next!). I'll regret not having got the most out of the country (no travel!) and not having learned enough of the language to even have a basic conversation with the taxi drivers. I'll miss the way something noticeable has changed every single time I go outside. But these all seem insignificant and I think there's something more to it. Or could it be just sentimentality because it was "home" for a while? It may take some time for me to figure this one out... and I think I may be back sometime to see a bit more of the country (maybe they'll have fixed the traffic lights!).

One final observation: I seem to be getting restless. It's been 5 or 6 months since I went on leave and this appears to be a pattern. When I returned from Europe in July of 2002, it was just after Christmas that I started working at UBC. When I returned from Australia, it was about 5 months before I started working at Emily Carr. And I became restless in Australia after about five and a half months of being there. It seems that's about as long as I can stand being unfocused (at least in one place). Julia commented that for her it would be more like a few hours but it's good to know what my limit is.

Friday, 18 July 2008

It's raining, it's pouring...

... the Old man is... yeah well it's really raining here again this morning. This is serious heavy rain (and I come from Vancouver, so I know whereof I speak). And the thunder and lightning is setting off car alarms again. It's really cool to live somewhere where storms are accompanied by huge rolling thunder crashes and the tremendous, powerful cracks of lightning bolts.

With the exception of the tropics, I have never been anywhere where it rains so much during the Summer. For a month or more now, we have been saying we should follow everybody else and buy umbrellas to hide away in a pocket or a bag. But it always feels like we're about to leave and the rain has to stop... sometime. It doesn't seem like it's going to.

On the bright side, it does seem to help keep the ground and the air clean. I wonder how much of it is caused by meteorologists seeding the clouds (they also apparently have technology in place to reduce the chance of rain for the opening ceremonies if necessary). The western media is acting like they've only just been made aware of the air quality problem in Beijing and its potential impact on the Olympic games. All construction in the city is slated to stop this Sunday so we'll see if that makes any difference. Sadly, as a result, streams of migrant workers are packing their few possessions and returning to their home provinces for the duration of the games. I say "as a result" but of course it is equally as a result of the desire to maintain "security" and a "clean" city for the games.

On a related note, I heard a news story on the World at Six on CBC saying that spectators would be searched for banners, flags, and noisemakers and that they would be confiscated. "No flags?", thought I, "That's kind of lame." After allowing this misconception to carry on for the length of the story, they added the extra detail that only flags smaller than 1m by 2m would be allowed. Who the heck needs a flag bigger than that?! Imagine you are sitting behind the guy with a flag bigger than that! Sheesh... Apparently umbrellas will be allowed, which seems like it may be a good thing.

It feels like the anticipation in the city has, if anything, declined over the past few weeks. I really felt like it has been growing since I arrived (maybe it was just my anticipation) but, as the last details get sorted out, I just don't feel any excitement. Oh, sure, there are a few more banners, the signs for the Olympic traffic lanes are going up, and workers are setting up venues around the city with big televisions for people to watch the events. People even lined up for hours at the bank to receive newly-printed 10 RMB notes with the Olympic stadium on them. But I just don't sense the excitement. I'm guessing it will turn on by decree.

Monday, 7 July 2008

The Rain!

It's 9:00am, Julia left for work 2 hours ago, and I'm listening to the morale-building going on outside one of the real-estate offices across the street. The workers in the office building kitty-corner to us often file out and do calisthenics in the parking lot early in the morning. But every morning these real-estate agents line up in two rows (one of men, one of women) on the sidewalk and do cheerleading routines involving chants, clapping, singing, and hand gestures, often to music.

The heat and humidity are already up; the former due mostly to two rare days of clear skies over the weekend. I no longer trust my key-chain thermometer as I have long suspected that it always reads between 27 and 29 degrees. I attribute this defect to the photograph I took of it maxed out at 50 degrees in northern Australia nearly 3 years ago. Google, however, says it is 27 degrees and 74% humidity right now... not bad for nine in the morning. It's amazing to me that a place can be this humid in the summer (wait for August!) and so dry in winter. If the heat doesn't dehydrate you here the air conditioning will and I wake up every morning with a dry throat.

The clear skies this weekend probably came thanks to the rain on Friday (rain seems to settle the fine particulate pollution). Julia and I met for dinner after work on Friday and then decided to go to a movie. As we emerged from the restaurant, it began to rain lightly. As we emerged from the taxi and sprinted to the cinema, it began to rain heavily. Forty minutes later, as our film was about to start, they informed us that Cinema 6 was being shut down because of water flooding into it and that we could get our money back. Upstairs, parts of the street were now flowing like rivers as the rain alternately poured and paused in 5-minute cycles. After half an hour trying to find a taxi that was (a) empty, (b) willing to pick us up (not sure why this is a problem), and (c) closer to us than to somebody else looking for the same thing, we gave up and walked to the subway. Unfortunately the subway was closed, due (as far as we could tell) to flooding. Tiring of waiting, we crossed the street and attempted to decipher the bus system. We did eventually manage to get close enough to home that we could walk the rest of the way, having become wet enough by then that we'd given up caring about staying dry anyway. In total, it took us two full hours to get home... this city doesn't deal well with heavy rain.