Any Seaside or Struts-like frameworks available for PHP?

Any Seaside or Struts-like frameworks available for PHP?

am 22.03.2005 04:08:02 von Thomas Gagne

I've been reading a lot about Seaside lately
and before that Struts .

Is there a predominant framework for PHP that provides many (most,
more?) of the features of either Seaside or Struts (or any other
examples you may suggest)?

Re: Any Seaside or Struts-like frameworks available for PHP?

am 22.03.2005 09:05:48 von Hans-Peter Zahno

Thomas Gagne wrote:

> I've been reading a lot about Seaside lately
> and before that Struts .
>
> Is there a predominant framework for PHP that provides many (most,
> more?) of the features of either Seaside or Struts (or any other
> examples you may suggest)?

For a struts implementation in PHP see 'Phrame',
http://phrame.sourceforge.net

Hans-Peter



------------ And now a word from our sponsor ------------------
Do your users want the best web-email gateway? Don't let your
customers drift off to free webmail services install your own
web gateway!
-- See http://netwinsite.com/sponsor/sponsor_webmail.htm ----

Re: Any Seaside or Struts-like frameworks available for PHP?

am 22.03.2005 18:16:30 von zeldorblat

No.

Re: Any Seaside or Struts-like frameworks available for PHP?

am 22.03.2005 18:49:40 von Peter Albertsson

"Thomas Gagne" wrote in message
news:tKmdnWXZpZGNEaLfRVn-1g@wideopenwest.com...
> I've been reading a lot about Seaside lately and
> before that Struts .
>
> Is there a predominant framework for PHP that provides many (most, more?)
> of the features of either Seaside or Struts (or any other examples you may
> suggest)?

Another one which I learned about today:

http://www.phpmvc.net/index.php

php.MVC is a PHP port of Jakarta Struts.

Best Regards,

Peter Albertsson

Re: Any Seaside or Struts-like frameworks available for PHP?

am 22.03.2005 23:13:47 von Thomas Gagne

Hans-Peter Zahno wrote:
> Thomas Gagne wrote:
>
>

>
> For a struts implementation in PHP see 'Phrame',
> http://phrame.sourceforge.net

Are you using it? Have you compared it to other PHP frameworks like phpmvc?
>
> Hans-Peter
>
>
>
> ------------ And now a word from our sponsor ------------------
> Do your users want the best web-email gateway? Don't let your
> customers drift off to free webmail services install your own
> web gateway!
> -- See http://netwinsite.com/sponsor/sponsor_webmail.htm ----

Re: Any Seaside or Struts-like frameworks available for PHP?

am 23.03.2005 02:49:33 von RainX

Thomas Gagne wrote:
> I've been reading a lot about Seaside lately

> and before that Struts .
>
> Is there a predominant framework for PHP that provides many (most,
> more?) of the features of either Seaside or Struts (or any other
> examples you may suggest)?

Re: Any Seaside or Struts-like frameworks available for PHP?

am 25.03.2005 00:09:40 von Henk Verhoeven

Hey Thomas, doing Php too?

I have recently been at a presentation from Avi Bryant about Seaside.
IMHO Seaside is in many ways a conventional MVC Framework with page
compostion. So is PhpPeanuts, but it also includes a persistency
framework, and is further with the use of metadata, which sort of
automates the development of user interface logic. Seaside still very
much depends on the implementation of event handlers, this is on a lower
level of abstraction, so there will be more details to take care of.
Of course Seaside has the advantage a more powefull programming
language: Smalltalk. As you know (but may not be very well known down
here) Smalltalk has this great feature called 'blocks' whichs is
particularly handy for wrinting event handlers. And for most dialects
there are usable persistancy frameworks.

PhpPeanuts runs on just php4 (though it's portable to php5) an MySQL,
which is somewhat limiting, but has a much larger installed base on web
servers ;-). And it has an upload, make 5 settings & go installation
procudure (ever tried to install the horde framework ?)

Interesting is the work in progess on unification with a real
(not-webbased) GUI library, wich will make it possible to run the same
code on a web based as well as on a Graphical UI. But this is not just
Seaside, it's squeeq Smalltalk too. (So why is it that you don't stick
to Smalltak? )

But the most interesting feature of Seaside is the use of real
continuations. This allows seaside applications to sort of ask a
question to the user and have the code in a wait state until the user
replies, then the code continues with the result from the user. It's
very much like modal dialogs in a GUI environmnet. This can not be done
as elegantly in php as it can in Smalltalk: Seaside implements its
Continuations by storing a copy of the stack in memory (Smalltalk has
not got the single request lifetime of objects, so you do not need to
serialize things through the session). When it is time to continue, the
answer is pushed on the stack and then the stack copy is reinstated with
a task switch. As far is i know there are no multiprocessing and stack
access functions in php.

From a straigtforward point of view, there are only three ways to
implement something like contintuations in php:

1. Add the necessary functions to the engine (the VM, in Smalltalk
terms) and recompile it. But i guess the result would not really be php
any longer

2. Express the control flow you want in objects. These objects
essentially follow the command pattern, and execute other objects that
represent other commands. This really is like executing a parse tree.
PhpPanuts has something like this so that it can not only execute its
navigational query objects against MySQL, but also directly in memory
against a graph of objects. I will add some links below.

3. Make some kind of precompiler that parses php like code and converts
it to some php-executable form: php source code, or the objects as
described in point 2.

In a broader sense Continuations are not just a matter of having code
wait for something non procedural to happen and then continue with the
response. It is mostly used to 'return' the user to the context he was
in before he started a specific task. The newest version of phpPeanuts
(which is not yet available for download) has a solution for this that
works by keeping track of all http requests as well as the recursive
user contexts. I admit that this is not as elegant as the use of
continuations, but it is much more lightweight (Seaside uses lots of
memory because of all those processes it has to keep, which reference
lots of objects that can not be garbage collected because of that), and
fits better to the PhpPeanuts user interfacing style: no wizards that
put the user in a procedural path, but letting the user choose freely
every step he makes.

PhpPeanuts is not trying to compete with other frameworks on the length
of its features list. Therefore i did not study truts (and also not
because the predecessors of PhpPeanuts are older then Stuts). The main
design targets of PhpPeanuts are:
- The simpelest thing that could possibly work to dynamicly create a
complete user interface from objects and metadata
- Flexibily and extensability. (If one can easily add a feature it does
not need to be in the framework).

Of course PhpPeanuts has its limitations, we have had three people
working with it for about a year, so we did run into them for sure. If i
have enough time i will refactor it this summer, i guess that would be
the basis for version 2.0. But no promises, the design limitations are
not that troublesome that i really must refactor, it's just that it
would make it more flexible & elegant ;-).

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.


References on Command Objects in phpPeanuts.

The following is meant to illustrate the idea of command objects and how
they can be combined. It is not meant to be a computationally complete
composite command object model (like LinkMessage was in VSE) and there
is no inplementation of a Continuation.

Basic comand object: MethodInvocation
http://www.phppeanuts.org/site/index.php?pntType=HcodeMethod &id=pnt.meta.PntMethodInvocation::_evaluate

Navigation over property, can be linked into navigational path:
http://www.phppeanuts.org/site/index.php?pntType=HcodeMethod &id=pnt.meta.PntMethodInvocation::_evaluate

Navigation over an array of objects, returns an array
http://www.phppeanuts.org/site/index.php?pntType=HcodeMethod &id=pnt.meta.PntMethodInvocation::_evaluate

Filtering objects from an array for which a condition applies:
http://www.phppeanuts.org/site/index.php?pntType=HcodeMethod &id=pnt.db.query.PntSqlFilter::evaluate

Logical expressions (And and or) for combination of filters
http://www.phppeanuts.org/site/index.php?pntType=HcodeMethod &id=pnt.db.query.PntSqlCombiFilter::evaluate



Thomas Gagne wrote:
> I've been reading a lot about Seaside lately
> and before that Struts .
>
> Is there a predominant framework for PHP that provides many (most,
> more?) of the features of either Seaside or Struts (or any other
> examples you may suggest)?

Re: Any Seaside or Struts-like frameworks available for PHP?

am 03.04.2005 10:23:11 von ivo

Hi,

> Is there a predominant framework for PHP that provides many (most,
> more?) of the features of either Seaside or Struts (or any other
> examples you may suggest)?

You may also want to have a look at Achievo ATK
(http://www.achievo.org/atk). It's not seaside, it's not struts, but
it allows you to build applications with minimal coding ('an
application in 10 lines of code' is the slogan). The demo application
is well documented and explains the basics.

Greetings,
Ivo