[Seaside] Seaside with PHP (sort of)

William Harford seaside at harford.org
Wed Apr 25 13:46:36 UTC 2007

On Apr 25, 2007, at 3:48 AM, Philippe Marschall wrote:

> 2007/4/25, William Harford <seaside at harford.org>:
> That's a real problem. Canvas benefits extremely from cascades and  
> blocks.

Phaux deals with cascades by returning $this in any method that does  
not logically return anything else. Of course PHP has nothing as  
elegant as blocks. Phaux render takes a string as it's argument to  
with() and all Phaux render tags answer __toString with the HTML  
equivalent. It's not a huge deal but there are situations where you  
might have to do things in an inside out fashion (creating the  
contents of something before you start to create the something). I  
personally think it's a billion times better than HTML templates.

> There is at least one ruby project. Ruby still does have continuations
> but will probably lose them in 2.0. There is also a template system
> similar to canvas called markaby

Markaby is interesting. PHP could do something similar to Markaby and  
it will still allow control structures in content generation. I think  
it would make the render stuff a little more verbose but it might be  
worth it.

Like I said PHP does not have true continuations but with a  
combination of exceptions and a little parsing I think it can be  
done. With phaux you set the onAnswerCallback for a component and  
then use callDialog. Execution does not halt and you have to split up  
a method into 2 or 3 methods. It's not ideal but it's close.

Do I dream of electric sheep?

Do I dream of electric sheep?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070425/db9f03b8/attachment.htm

More information about the seaside mailing list