Web Frameworks (was Re: Squeak book !)

Avi Bryant squeak-dev at lists.squeakfoundation.org
Tue Sep 3 16:46:02 UTC 2002


On Tue, 3 Sep 2002 goran.hultgren at bluefish.se wrote:

> Well, I was referring to your use of template files (similar to ASP/JSP
> I guess)

Not very similar, but that's ok ;-).

> b - self builder.
> b start; h1: 'Your name please';postForm.
> namefield _ b html: 'Name: '; inputText.
> namevar _ b html: 'Your name is: '; var.
> b endForm; end.
> b ifPost: [namevar value: namefield value]
> ^b
>
> (this is unrun pseudocode but this should work). The interesting part is
> the #inputText message returning a widget which can be called with
> value:/value to set/get its content. #var embeds a variable in the page.

Yes - the programmatic part of Seaside 2.0 ("Borges") takes a callback
approach instead.  So in Borges the above code might look something like:

b header: 'Your name please'.
b form: [
  b text: 'Name: ';
    textInputWithValue: '' callback: [:n | name := n];
    text: 'Your name is ', name.
]

Cheers,
Avi




More information about the Squeak-dev mailing list