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.Jenk wrote:If someone ports GLORP to PHP, I'll have their babies.
Seaside in PHP (Phaux)
Moderator: General Moderators
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.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 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.
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 SeasideBDKR wrote:Checked out Ruby?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.
- stereofrog
- Forum Contributor
- Posts: 386
- Joined: Mon Dec 04, 2006 6:10 am
- stereofrog
- Forum Contributor
- Posts: 386
- Joined: Mon Dec 04, 2006 6:10 am
- kyberfabrikken
- Forum Commoner
- Posts: 84
- Joined: Tue Jul 20, 2004 10:27 am
I see. It actually works -- That's kind of impressive.ev0l wrote: Again if you need to you just register that component for backtracking with registerObjectOnKeyPath().
If you can restore the state, without relying on anything but the request, then it is stateless.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.
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: 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
I don't understand what you mean by that?ev0l wrote: Phaux's URL's are opaque.
I should know better, but I can't resist; Greenspun's Tenth Ruleev0l wrote:Smalltalk is 30 years old and is still more powerful than any other language out there.
Yes, when I first started learning 00.ev0l wrote:Have you checked out Smalltalk?BDKR wrote: Checked out Ruby?
Ruby and Smalltalk really don't compare, other than on a purely superficial level.
But don't take this as a fight or anything. I'm far from having any zeal for a particular language anymore.
I do think that Ruby is one very powerful language and similarities are more then superficial.
Cheers
Thanks!kyberfabrikken wrote: I see. It actually works -- That's kind of impressive.
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: If you can restore the state, without relying on anything but the request, then it is stateless.
As they should. They should only add meaning to the URL when it is required and that is almost never.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.
The URLs are to cryptic to have meaning to a person.kyberfabrikken wrote:I don't understand what you mean by that?ev0l wrote: Phaux's URL's are opaque.
Just make sure you aren't confusing the frameworks with the languages they're based on.Jenk wrote: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 SeasideBDKR wrote:Checked out Ruby?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.
Or an integrated IDE, or a VM, or an Image.stereofrog wrote:And the creator of Ruby describes has language as " Smalltalk minus unfamiliar syntax".
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.