Continuations Based Web Framework - Seaside.

M

Mike Thompson

'Seaside' is a Smalltalk framework for what might be called "Modal Web
Development" or "Synchronous Web Programming", or even "Continuation
Based Web Apps".

http://www.beta4.com/seaside2/

Very sexy it looks too. And it seems to be generating a lot of interest
- Ruby and Java variants have already sprung up:

http://rubyforge.org/projects/borges/
http://lakeshore.sourceforge.net/

I googled for the python spin-off but didn't find one. Closest I found
was Imposter (http://csoki.ki.iif.hu/~vitezg/impostor/) which looks like
an earlier, partially failed attempt to do what Seaside now seems to be
delivering.

Anyway, I guess all I'm doing is drawing this to the community's
attention. Sophisticated web applications seems to be one of Python's
key domains and this looks a significant new development in the area.
 
@

@(none)

Mike said:
'Seaside' is a Smalltalk framework for what might be called "Modal Web
Development" or "Synchronous Web Programming", or even "Continuation
Based Web Apps".

Continuation Based Frameworks seem to be getting quite some attention
lately. For example in the Lisp world. Check out Bill Clementson's blog
for some excellent posts.

http://home.comcast.net/~bc19191/blog/041229.html

And Seaside looks indeed very nice. Would be good to see it generate
some new interests in Smalltalk/Squeak.
I googled for the python spin-off but didn't find one.

Does Python really need yet another framework? Apart from the
intellectual excersise, wouldn't it be nice if Python would get a
framework "for the rest of us" (meaning: mere mortals) which would focus
upon getting work done in a simple manner instead of creating yet
another, new, hip, exciting, way of creating dynamic websites? If Python
cannot deliver a PHP clone, at least you would expect a Rails lookalike.
And though part of the Rails stack may be surpassed easily by Python
equivalents, no Python alternative offers (imho of course) the same
level of simplicity, elegance and pragmatism (!!) as Rails does.

Regards,

Iwan
 
G

gabriele renzi

Mike Thompson ha scritto:
'Seaside' is a Smalltalk framework for what might be called "Modal Web
Development" or "Synchronous Web Programming", or even "Continuation
Based Web Apps".

http://www.beta4.com/seaside2/

Very sexy it looks too. And it seems to be generating a lot of interest
- Ruby and Java variants have already sprung up:

http://rubyforge.org/projects/borges/
http://lakeshore.sourceforge.net/

actually, there are also implementations in Scheme, Common Lisp
(UnCommonWeb) and Cocoon-FLOW has similar concepts.
And somewhere (I think on the portland pattern repository) I recall
reading that Viaweb (aka "the first web app") was written in CPS. Also
notice that the Wee project in ruby is more advanced that Borges.
I googled for the python spin-off but didn't find one. Closest I found
was Imposter (http://csoki.ki.iif.hu/~vitezg/impostor/) which looks like
an earlier, partially failed attempt to do what Seaside now seems to be
delivering.

I think "independent" more than earlier, it seem many people are
reinventing this from time to time.
Anyway, I just wanted to point out that IIRC something on this lines
appeared recently in the nevow svn tree, maybe you can take a look.
 
S

Steve Holden

gabriele said:
Mike Thompson ha scritto:



actually, there are also implementations in Scheme, Common Lisp
(UnCommonWeb) and Cocoon-FLOW has similar concepts.
And somewhere (I think on the portland pattern repository) I recall
reading that Viaweb (aka "the first web app") was written in CPS. Also
notice that the Wee project in ruby is more advanced that Borges.



I think "independent" more than earlier, it seem many people are
reinventing this from time to time.
Anyway, I just wanted to point out that IIRC something on this lines
appeared recently in the nevow svn tree, maybe you can take a look.

I did actually do some sort-of-related work in this area, which I
presented at PyCon DC 2004 - you can access the paper at

http://www.python.org/pycon/dc2004/papers/18/Setting_A_Context.pdf

An audience member mentioned the Smalltalk and Scheme-based work on web
continuation frameworks, and I was sorry my answer at the time seemed
unduly dismissive. There are some interesting similarities, and though
my own implementation is decidedly clunky I like to think the paper
explains some of the advantages of maintaining state and why the "back"
button is an obnoxious anachronism :)

regards
Steve
 
K

Kendall Clark

I did actually do some sort-of-related work in this area, which I
presented at PyCon DC 2004 - you can access the paper at

http://www.python.org/pycon/dc2004/papers/18/Setting_A_Context.pdf

An audience member mentioned the Smalltalk and Scheme-based work on web
continuation frameworks, and I was sorry my answer at the time seemed
unduly dismissive.

That was me, actually. I remain surprised that there isn't a move
afoot either to implement something like Seaside or Borges in Python
or to adapt one of the existing web frameworks to be
modal/continuation style.

Between this pressure (which isn't new, since as Steve points out, I
was talking about this in Python community last year, and I wasn't
nearly the first) and the growing popularity of Ruby on Rails, there's
some small hint that Ruby is gaining on Python re: non-Java web app
mind share. I think that's a v. important niche for Python and would
like to see us remain strong there (though I've not *done* much about
this, alas).
There are some interesting similarities, and though
my own implementation is decidedly clunky I like to think the paper
explains some of the advantages of maintaining state and why the "back"
button is an obnoxious anachronism :)

I'd still like to publish a piece on XML.com about modal web app
style, preferably with a Python example, though Borges would be fine.

Best,
Kendall Clark
XML.com Managing Editor
 
J

Jon Perez

none said:
Does Python really need yet another framework? Apart from the
intellectual excersise, wouldn't it be nice if Python would get a
framework "for the rest of us" (meaning: mere mortals) which would focus
upon getting work done in a simple manner instead of creating yet
another, new, hip, exciting, way of creating dynamic websites? If Python
cannot deliver a PHP clone, at least you would expect a Rails lookalike.

Spyce (http://spyce.sf.net) would be the superior Python-based PHP clone
you are looking for.
 
P

Paul Rubin

Kendall Clark said:
That was me, actually. I remain surprised that there isn't a move
afoot either to implement something like Seaside or Borges in Python
or to adapt one of the existing web frameworks to be
modal/continuation style.

Since Python doesn't have continuations, that would be a bit tricky.
 
V

Valentino Volonghi aka Dialtone

Paul Rubin said:
Since Python doesn't have continuations, that would be a bit tricky.

Since I've already said Nevow with wolf works the same as borges.
The only thing that wouldn't work without continuations is the back
button. With greenlet module (from Armin Rigo) also the back button will
work.

I've also already posted an url to the svn sandbox with a working
example inside.
 
P

Paul Rubin

dial#####$#$#NOSPAM####$$##[email protected] (Valentino Volonghi aka Dialtone) said:
Since I've already said Nevow with wolf works the same as borges.
The only thing that wouldn't work without continuations is the back
button. With greenlet module (from Armin Rigo) also the back button will
work.

Thanks, I'm not familiar with wolf, borges, or greenlet. I've also
been wondering what Rails is.

Maybe some configuration of PyPy can supply first-class continuations
like the old Stackless did. That would be really cool for all sorts
of reasons.

Then again, maybe it's reasonable to just fake it all, using ordinary
threads and queues. I might try coding something that way.
 
I

Ian Bicking

Steve said:
I did actually do some sort-of-related work in this area, which I
presented at PyCon DC 2004 - you can access the paper at

http://www.python.org/pycon/dc2004/papers/18/Setting_A_Context.pdf

An audience member mentioned the Smalltalk and Scheme-based work on web
continuation frameworks, and I was sorry my answer at the time seemed
unduly dismissive. There are some interesting similarities, and though
my own implementation is decidedly clunky I like to think the paper
explains some of the advantages of maintaining state and why the "back"
button is an obnoxious anachronism :)

I think the technique you talked about is an easier way to achieve a
similar goal as the continuation-based frameworks. While using
continuations for web applications is an interesting idea, I don't think
it's been shown to be successful. It's certainly not something I'd want
to implement on Python (even given the actual features to make it
possible), and from what I've read of the Ruby projects that use it
(Borges and Wee?), they aren't ready to implement production
applications either. The technique you present could be implemented on
any framework, right now, with the expectation that it would work in a
production situation.
 
I

Ian Bicking

Kendall said:
Between this pressure (which isn't new, since as Steve points out, I
was talking about this in Python community last year, and I wasn't
nearly the first) and the growing popularity of Ruby on Rails, there's
some small hint that Ruby is gaining on Python re: non-Java web app
mind share. I think that's a v. important niche for Python and would
like to see us remain strong there (though I've not *done* much about
this, alas).

I think that's probably true -- at least in terms of mindshare, even
though that might not reflect on actual work done. But, Rails is really
not a very experimental framework, and the existance of
continuation-based frameworks for Ruby is an aside. If such frameworks
happen at all for Python, I think they will be an aside as well.
 
K

Kendall Clark

I think that's probably true -- at least in terms of mindshare, even
though that might not reflect on actual work done. But, Rails is really
not a very experimental framework, and the existance of
continuation-based frameworks for Ruby is an aside. If such frameworks
happen at all for Python, I think they will be an aside as well.

There's no sense whatever in which Rails is "experimental" -- who
suggested such a thing? No, Rails hits a sweet spot, for a class (I
suspect) of simple to mediumly-complex web app. Which is what most web
apps *are*, after all.

I don't begrudge Rails any popularity, I just want us to defend our
turf. Sometimes that means ignoring what the other guy does, but
sometimes it means aping him. I suspect in this case some aping would
be a good thing.

As for continuation-based frameworks, as you point out to Steve,
that's largely an implementation technique and similar results may be
achieved with other techniques (though I, unlike you, did *not* favor
Steve's technique, as I recall). Continuations are certainly not
experimental, nor are continuation-based modal web frameworks. The
latter are *en vogue* and being seen to be *en vogue* is often an
important technological virtue, especially for a perceived market
niche leader.

Kendall Clark
 
S

Steve Holden

Ian said:
I think the technique you talked about is an easier way to achieve a
similar goal as the continuation-based frameworks. While using
continuations for web applications is an interesting idea, I don't think
it's been shown to be successful. It's certainly not something I'd want
to implement on Python (even given the actual features to make it
possible), and from what I've read of the Ruby projects that use it
(Borges and Wee?), they aren't ready to implement production
applications either. The technique you present could be implemented on
any framework, right now, with the expectation that it would work in a
production situation.
That's true, but there's no denying it's clunky, and there are a few
problems with it. Despite that, I am still persisting with developemnt,
albeit slowly due to lack of time, and hope to have something further to
report.

It's the *ideas* that are important, though, rather than the
implementation, and my initial hope was to publicise the weakness of
statelessness on the web as applications become more complex.

regards
Steve
 
S

Steve Holden

Ian said:
I think the technique you talked about is an easier way to achieve a
similar goal as the continuation-based frameworks. While using
continuations for web applications is an interesting idea, I don't think
it's been shown to be successful. It's certainly not something I'd want
to implement on Python (even given the actual features to make it
possible), and from what I've read of the Ruby projects that use it
(Borges and Wee?), they aren't ready to implement production
applications either. The technique you present could be implemented on
any framework, right now, with the expectation that it would work in a
production situation.
That's true, but there's no denying it's clunky, and there are a few
problems with it. Despite that, I am still persisting with developemnt,
albeit slowly due to lack of time, and hope to have something further to
report.

It's the *ideas* that are important, though, rather than the
implementation, and my initial hope was to publicise the weakness of
statelessness on the web as applications become more complex.

regards
Steve
 
S

Steve Holden

Kendall said:
That was me, actually. I remain surprised that there isn't a move
afoot either to implement something like Seaside or Borges in Python
or to adapt one of the existing web frameworks to be
modal/continuation style.
Ah, glad to make your acquaintance again - I lost your email address in
a disk crash shortly after PyCon DC 2004.

[...]
I'd still like to publish a piece on XML.com about modal web app
style, preferably with a Python example, though Borges would be fine.
Would an adaptation of the PyCon paper be any use in this context?

regards
Steve
 
M

Mike Meyer

Steve Holden said:
It's the *ideas* that are important, though, rather than the
implementation, and my initial hope was to publicise the weakness of
statelessness on the web as applications become more complex.

This needed publicity? Isn't it obvious to anyone who has ever
written a non-trival web application? Enough so that people started
referring to non-web applications as "stately" rather than "stateful".

<mike
 
F

floydophone

Hi... I'm Peter Hunt. I've implemented stuff like this for a variety of
different frameworks. I authored nevow.wolf and the more recent
CherryFlow (http://trac.cherrypy.org/cgi-bin/trac.cgi/wiki/CherryFlow).
I came up with this idea after looking at Cocoon FlowScript examples.
Python generators suit continuation-based web development very nicely.
If you take a look at CherryFlow version 1, the core of it is just
about 15 lines.

I'm constantly updating CherryFlow. I'll keep you posted.

Also, if anyone wants to assist me with Subway, my Ruby-on-Rails clone,
let me know :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top