"Berislav Lopac" <berislav.lopac@lopsica.com> wrote in message
news:cpkfsq$l0q$1@garrison.globalnet.hr...[color=blue]
> I'm not sure what you mean by "finite state automata"; by stateless, I[/color]
mean[color=blue]
> that PHP has no internal mechanism for keeping keeping track os objects[/color]
and[color=blue]
> their states. Each time a PHP script is invoked it has to rebuild its
> environment all over again from scratch, using mechanisms such as
> serialization, cookies and databases to keep track of objects' states.[/color]
While[color=blue]
> Java servlets and ASP both have "application-scoped" objects, PHP's[/color]
approach[color=blue]
> is more natural when it comes to serving data over HTTP (what it's mostly
> used for), which itself has no state tracking.[/color]
sure, but while the script runs (and issues remote calls) it has a tons of
state, and that is what it counts in this particular case. No matter if you
issue SOAP or CORBA call, your php script will marshall request, send it
over the wire, wait for response, unmarshal response, continue with
execution of the script. Fact that one usually uses text based protcol over
http messages, and another usually uses binary format over the raw socket
connection is in both cases transparent to the programming language user, so
izt makes no sense to claim (on that basis at least) that one is better fit.
As a matter of fact from, the language interface point of view, one could
implement SOAP calls over binary sockets, and CORBA with text protocol on
http messages,and they would remain the same semantics, and language
interface (but different performance).
One should not mix nature of http protocol, with nature of the language.
[color=blue]
> But you can easily imagine an efficient site built in a way that for each
> page displayed, php calls out a database, waits for response, renders[/color]
output[color=blue]
> and displays it?
>
> IMO, SOAP server/client communication between elements of a single
> application/site adds only a small overhead above what we usually see in
> other types of communication, while adding significant flexibility in data
> sources on one hand and serving own data to other clients on the other.[/color]
sure, since calls to database are reasonably efficiently implemented. Calls
to the SOAP are on the other hand impractical for each and every page
display, unless you have a very small number of patient users and oversized
servers.
rush
--
http://www.templatetamer.com/ http://www.folderscavenger.com/