Seaside in PHP (Phaux)

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

ev0l
Forum Commoner
Posts: 56
Joined: Thu Jun 21, 2007 1:50 pm

Post by ev0l »

Jenk wrote:If someone ports GLORP to PHP, I'll have their babies.
I don't think you can. PHP codes not have code blocks. Smalltalk is 30 years old and is still more powerful than any other language out there.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

I don't think it would be impossible, but without code blocks it would certainly be very difficult - and lengthy.

Perhaps something can be done with reflection, or zealous use of eval();

It's not one I am going to start, though.
ev0l
Forum Commoner
Posts: 56
Joined: Thu Jun 21, 2007 1:50 pm

Post by ev0l »

Jenk wrote:I don't think it would be impossible, but without code blocks it would certainly be very difficult - and lengthy.

Perhaps something can be done with reflection, or zealous use of eval();

It's not one I am going to start, though.
I think you would need closures. You might be able to do it if you implement some sort of preprocessor. The only real solution would be to hack it into the Zend engine.

I thought about adding continuations to Phaux but even doing a proof of concept would be difficult and I am not even sure it would work with out some serious unsolvable bugs.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

ev0l wrote: I don't think you can. PHP codes not have code blocks. Smalltalk is 30 years old and is still more powerful than any other language out there.
Checked out Ruby?
ev0l
Forum Commoner
Posts: 56
Joined: Thu Jun 21, 2007 1:50 pm

Post by ev0l »

BDKR wrote: Checked out Ruby?
Have you checked out Smalltalk?

Ruby and Smalltalk really don't compare, other than on a purely superficial level.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

BDKR wrote:
ev0l wrote: I don't think you can. PHP codes not have code blocks. Smalltalk is 30 years old and is still more powerful than any other language out there.
Checked out Ruby?
The creator of RoR admits Smalltalk and Seaside "is the standard by which all other frameworks are trying to achieve" or something to that effect. I do know that at a conference, he said "I defy anyone to come up here with their framework and create dynamic websites faster than we can. Except Avi" Where Avi is Avi Bryant, the creator of Seaside :)
User avatar
stereofrog
Forum Contributor
Posts: 386
Joined: Mon Dec 04, 2006 6:10 am

Post by stereofrog »

And the creator of Ruby describes has language as " Smalltalk minus unfamiliar syntax". ;)
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

"familar" is a very subjective word. ;)
User avatar
stereofrog
Forum Contributor
Posts: 386
Joined: Mon Dec 04, 2006 6:10 am

Post by stereofrog »

I guess he meant "unfamiliar for an ordinary c or perl programmer".

(lets back on topic)
User avatar
kyberfabrikken
Forum Commoner
Posts: 84
Joined: Tue Jul 20, 2004 10:27 am

Post by kyberfabrikken »

ev0l wrote: Again if you need to you just register that component for backtracking with registerObjectOnKeyPath().
I see. It actually works -- That's kind of impressive.
ev0l wrote: No you misunderstand me. The application is still stateful but if you _need_ a user to be able to book mark a page you can add a little bit of meaning full info to the URL. It's completely optional and only takes a second to do.
...
It's not stateless.
If you can restore the state, without relying on anything but the request, then it is stateless.
ev0l wrote: It's also not "a lot of work" to add a couple get vars to the url. Overwride updateRoot in your subclass of WHComponent and do something
Yet, if it falls natural to do one thing, and out of the ordinary to do another, we know what most people will choose most of the time. I guess our different points of view is that I would resort to use server side state, only if it's strictly needed, while you advocate using per default, but beef it up with client side state, when that's needed. Obviously, both strategies would work out, if followed through.
ev0l wrote: Phaux's URL's are opaque.
I don't understand what you mean by that?
ev0l wrote:Smalltalk is 30 years old and is still more powerful than any other language out there.
I should know better, but I can't resist; Greenspun's Tenth Rule
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

ev0l wrote:
BDKR wrote: Checked out Ruby?
Have you checked out Smalltalk?

Ruby and Smalltalk really don't compare, other than on a purely superficial level.
Yes, when I first started learning 00.

But don't take this as a fight or anything. I'm far from having any zeal for a particular language anymore. :wink:

I do think that Ruby is one very powerful language and similarities are more then superficial.

Cheers :D
ev0l
Forum Commoner
Posts: 56
Joined: Thu Jun 21, 2007 1:50 pm

Post by ev0l »

kyberfabrikken wrote: I see. It actually works -- That's kind of impressive.
Thanks!
kyberfabrikken wrote: If you can restore the state, without relying on anything but the request, then it is stateless.
You can't restore the state. Phaux's state is to rich. What you can do is add some meaning to the URL and deal with that meaning if the session has expired or is not available (like a user coming from a bookmark).
kyberfabrikken wrote: Yet, if it falls natural to do one thing, and out of the ordinary to do another, we know what most people will choose most of the time.
As they should. They should only add meaning to the URL when it is required and that is almost never.
kyberfabrikken wrote:
ev0l wrote: Phaux's URL's are opaque.
I don't understand what you mean by that?
The URLs are to cryptic to have meaning to a person.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Jenk wrote:
BDKR wrote:
ev0l wrote: I don't think you can. PHP codes not have code blocks. Smalltalk is 30 years old and is still more powerful than any other language out there.
Checked out Ruby?
The creator of RoR admits Smalltalk and Seaside "is the standard by which all other frameworks are trying to achieve" or something to that effect. I do know that at a conference, he said "I defy anyone to come up here with their framework and create dynamic websites faster than we can. Except Avi" Where Avi is Avi Bryant, the creator of Seaside :)
Just make sure you aren't confusing the frameworks with the languages they're based on. :wink:
ev0l
Forum Commoner
Posts: 56
Joined: Thu Jun 21, 2007 1:50 pm

Post by ev0l »

stereofrog wrote:And the creator of Ruby describes has language as " Smalltalk minus unfamiliar syntax". ;)
Or an integrated IDE, or a VM, or an Image.

Don't get me wrong Ruby is a great language but it is not "Smalltalk minus unfamiliar syntax". In either case I like Smalltalk's syntax and think C's (and the languages that copy it) syntax is a mistake.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

ev0l wrote: In either case I like Smalltalk's syntax and think C's (and the languages that copy it) syntax is a mistake.
Now there's a huge topic right there: the functionality and aesthetics of syntax. :D

That could go on forever methinks. :twisted:
Post Reply