weblocks?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

weblocks?

Sophie424
I was just browing the lisp/weblocks framework
http://www.defmacro.org/ramblings/continuations-web.html and wondered if
someone more knowledgeable about (either) seaside or weblocks might comment
on whether it is essentially a seaside clone, or offers something more. Some
of the constructs offered in it seem awfully convenient!

Thanks!



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: weblocks?

Philippe Marschall
2007/11/27, itsme213 <[hidden email]>:
> I was just browing the lisp/weblocks framework
> http://www.defmacro.org/ramblings/continuations-web.html and wondered if
> someone more knowledgeable about (either) seaside or weblocks might comment
> on whether it is essentially a seaside clone, or offers something more. Some
> of the constructs offered in it seem awfully convenient!

The offered constructs seem awfully familiar. The AJAX integration
seems tighter though.

This is who I would do it in Seaside:

Handling User Actions

renderLinkOn: html
        html anchor
                callback: [ self doSomething ];
                with: 'Some Link'

User Actions And Continuations

renderLinkOn: html
        html anchor
                callback: [
                        (self call: MyLoginComponent new)
                                ifTrue: [ self showProtectedContent ]
                                ifFalse: [ self showError ] ];
                with: 'Some Link'

#chooseFrom:, #confirm:, #inform: for do-choice, do-confirmation and
do-information

UI State Management And Widgets

Magritte

Sequential Control Flow

go
        (self agreement1
                and: [ self agreement2 ]
                and: [ self agreement3 ])
                        ifTrue: [ self showProtectedContent ]
                        ifFalse: [ self showError ]

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: weblocks?

Sophie424

"Philippe Marschall" <[hidden email]> wrote in message
>> Some
>> of the constructs offered in it seem awfully convenient!
>
> The offered constructs seem awfully familiar. The AJAX integration
> seems tighter though.

Correct, its the AJAX part that seems very convenient, and the automatic
fallback in non-JS browsers.

-- Sophie



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: weblocks?

Sophie424
In reply to this post by Philippe Marschall

"Philippe Marschall" <[hidden email]> wrote in message
> The offered constructs seem awfully familiar. The AJAX integration
> seems tighter though.

It also seems to approach the HTML generation of viewers & editors
differently, automatically generating most of the #renderContentOn: ... a
bit more in Magritte space than straight Seaside. Quoting from
http://trac.common-lisp.net/cl-weblocks/wiki/UserManual

  "... neither the programmer nor the designer should have to write HTML -
most of the time HTML should be generated automatically. The programmer's
job is to define the data structures, the high level UI components, and the
business logic. The designer's job is to create appropriate stylesheets. The
actual HTML markup generation is the job of the framework."

- Sophie



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: weblocks?

Sophie424
In reply to this post by Philippe Marschall

"Philippe Marschall" <[hidden email]> wrote in message
> The offered constructs seem awfully familiar. The AJAX integration
> seems tighter though.

And it seems to do some very convenient automatic updating of changed
components (widgets) ... all under AJAX:
" ... Every time a value of any slot of the widget changes, Weblocks detects
the change using a hook in MOP and marks the widget as dirty (it is of
course possible to turn this behavior off for some slots). Once the action
is fully evaluated, Weblocks sends a list of dirty widgets back to the
client, and each dirty widget is updated on the browser via JavaScript.
Since the 'Modify' action changes the state of the dataform widget, the
dataform is marked by Weblocks as dirty and the newly rendered version is
sent to the client."



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside