
Originally Posted by
Dr Livingston
but I'm not following your...part, can you explain more? Thanks.
Just a statment about what web development is
You get one string in, looks something like this:
Code:
GET /search?q=php HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
And then you return a string, which looks something like this:
Code:
HTTP/1.x 200 OK
Cache-Control: private
Content-Type: text/html
Content-Encoding: gzip
Date: Fri, 15 Apr 2005 20:11:38 GMT
<html>
...
</html>
Fundamentally, that is all you are doing. Different parts of the string are handled by different programs (Apache handles the "GET /search?q=php HTTP/1.1" part for example) but utlimatley that is what you are doing. PHP parses some of the input string into arrays to make life easier for you, but you are still playing the "build a string" game.
I have to admit I didn't fully grap this until I started learning to use Ruby without Rails. Ruby is much more general than PHP, it isn't focused on web development. PHP is becomming more useful for non-web things, just as Ruby and Python are becomming more useful for web things. (With Ruby, this is mostly due to Rails.)
Beyond that, the challange is to build that output string as "fast" as possible. (I've overloaded "fast" a little there. I mean fast rendering of the HTML, fast development time, fast maintenance, everything.)
WRT Javascript and CSS, I treat them much like images. I just put them in a public directory on the server, and link to them from my HTML. I try to avoid building CSS per request, the same as I try to avoid building images per request. Hell, I try and build as little HTML per request as possible too; it all fits into the "render as fast as possible with as little effort on the part of the developer as possible" idea 
WRT server-side development... I don't consider myself a server-side developer, more someone who builds web interfaces. In my case, that usually involves some web design and user interface design too, though nothing I would consider "heavy" server side development, like writing database servers or web servers or anything like that.
Douglas
Bookmarks