|
Lukas Renggli is up again, this time talking
about Seaside and how it fits with the "Web 2.0" meme. So Seaside
does a lot of things out of the box:
|
Heh. He said I'd get on their case for bad RSS. Lol :)
This talk is about Seaside's use of AJAX, which gives you client
level interactivity.
You want to concentrate on your web app, not on browser issues
(especially browser incompatibilities). Seaside masks that by using
Javascript [ed: Depending on how well your browser handles
Javascript: see TinyMCE, for instance...].
The integration is via the Scriptaculous Javascript library. It
handles things like drag and drop, in place editing, etc. The
important thing is, you can express all of this in Smalltalk -
Seaside has APIs for that.
Here's a small example of something interesting: shared state
across multiple browser instances:
Example:
html effect
id: 'hint';
shake.
becomes:
new Effect.Shake('hint');
You integrate this the same way we saw in the
short example 2 days ago.
The kind of code you can write:
html (updater | periodical | request | evaluator)
[OPTIONS]; *
[HANDLER]; *
[TRIGGER]; *
[CALLBACK]; *
Note: I don't guarantee that the code examples are perfect :)
"in place editor"
html span
script: (html inPlaceEditor
triggerInPlaceEditor: [:v | anItem title];
callback: [:r | r render: anItem];
with: anItem title.
"drag & drop"
html form id: 'checkboxes'; with: [
html div
id: 'items';
script: (html sortable
tag: 'div';
onUpdate: (html request
triggerSortable: 'items'
callback: [:v | self model item: v]));
class: 'items';
with: [self renderItemsOn: html]]
For debugging, you can usually debug in the Smalltalk debugger. If you have issues at the Javascript level, use Firefox and the FireBug extension that gives you some Javascript debugging capability. And see scriptaculous.seasidehosting.st.
Technorati Tags:
esug, smalltalk, seaside, web2.0