No (not out of the box anyway) BUT the beauty of PHP is its much simpler
than JSP or ASP's server.response() server.request() methods (sorry if thats
not the exact syntax - I haven't done huge amounts of ASP/JSP work lately),
in most cases you simply output the data (i.e. print / echo "something";)
for the response (maybe in conjuction with an optional http header - the
default is text/html but you could send pretty much any MIME type - jpegs,
pdfs etc).  This means knocking up simple scripts is much easier quicker...

The request object is taken care in most cases by just being there as a php
variable with the same name as html / http element - i.e. if your html form
has an element called "bob" then when this form is (via http post / get)
sent back to a PHP script the variable is available as $bob.  How simple!
Sometimes you might want to use HTTP_GET_VARS['bob'] but I haven't
encountered a time where thats necessary apart from when retrieving server
info - auth_user, server_name etc (perhaps someone else could explain other
situations when that is required?)

Of course you could create request and response classes in PHP if you wanted
to but that would remove the simplicity, beauty and speed of the langauge
(IMHO).  After all when I look at a JSP script I just think "what a waste of
code - server.response(thismethod(anothermethod(x))) just to output
something!!"

Don't get me wrong I am not bad mouthing Java (in fact I use it too - just
not for web programming) its features are there for security (ideal for
e-banking), object orientated reasons and J2EE stuff, but with PHP you can
really just get to the core of 90% of what web scripts need to do - you just
need to return some data in HTML / XML back to the browser as efficiently
and quickly as possible.

I am bad mouthing ASP though! I think its over-complicated for no good
reasons when compared to PHP! In addition you have a severe lack of libary
functions (image manipulation, database access (other than the terribly slow
ODBC option or the ADO option) XML etc).  I presume VB.NET and C# will try
to make up for these things by offering the windows forms interfaces and
other new stuff.

In my view

echo "something"; (interpreted by PHP machine code cgi / isapi module)

would appear on the face of things to be a lot quicker than:

servlet.response("something");  (in java byte code (hmm slow!) interpreted
by jsp/servlet/library engine then into machine code)

or

server.response("something"); (code interpreted by class / library in
asp.dll or suchlike then into asp engine / windows service then machine
code)


obviously the string "something" would be something dynamic like a database
result or such like but you get the idea. But I could be wrong!

What really impresses me about PHP is that it offer a version of their
scripting engine that will run on any almost any platform. This is machine
code complied and so in theory outperforms the cross platform Java
(byte-code), and maybe asp (visual basic - interpreted) which is also know
to be a bit sluggish compared with PHP, but of course only really runs on
Win32 (i know there's chillisoft - asp for unix) - but thats not exactly a
realistic option.

As you can see I have bathered on a bit (opps I have just realised this was
a newbie question!), the reason being that I had to make this comparision
for a company a while back - they said whats the best web/ intranet servers
side technology - I said (after careful consideration of various factors,
including such things  as how easily existing staff could pick up the
technlogy, and value for money) PHP running on Win32/IIS (offers the best
solution - in my particular client's case - using a Windows Domain / MS-SQL
Databases).

What does everyone else think - or I am completely barking up the wrong
tree?  I expect a lot of "Linux rocks use Linux and MYSQL/Postgres"
responses, but for those coming from a ASP background with IT managers
wanting to use MS products whereever possible using PHP on Win32 makes
sense.


"Luke Crouch" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Does PHP have built-in support for using request and response objects?
> Thanks,
>
> -L
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to