On Sat, 15 Nov 2003 21:15:04 GMT, Martin Euredjian wrote:
[color=blue]
> A follow-up question/s (please excuse my ignorance of the subject):
>
> Where/when are the following technologies used in a site:
>
> PHP[/color]
PHP is, like the name represents, a Preprocessor. It processes your source
code (a plain text file) ON THE SERVER, before it ever gets to the viewer's
browser. This is useful, since you can spew out simple HTML that anyone's
computer can view as a result of much more complex scripting (which their
browser never knows about).
[color=blue]
> DHTML[/color]
Basically, DHTML = CSS + JavaScript
DHTML lets you work with and manuipulate your CSS and HTML elements on the
viewer's browser.
[color=blue]
> CSS[/color]
CSS allows you to present visual and styling elements which are seperate
from the content of a page. For example, in HTML, you would think like:
Profits this month were [Make this blue]One Hundred Billion Dollars![Stop
making this blue]
With the CSS way of thinking, this would be like:
(Style section)
[Make normal text black]
[Make "Monthly Profits" blue]
(etc...)
(Content Section)
Profits this month were ["Monthly Profits"]One Hundred Billion Dollars![End
"Monthly Profits"]
(This isn't actual CSS code, this is just the way of thinking.) This might
seem trivial at first, but suppose you had 120 listings on 10 pages of a
whole year's worth of stats. If you wanted to change "Monthly Profits" from
blue to green, you could just change one color in the Style file, not 120
entries in each Content file.
[color=blue]
> TABLES[/color]
Tables are for tables. They say we shouldn't use them for layout, and I
usually don't. But sometimes there's no better solution, so I have to.
[color=blue]
>
> CSS vs. TABLES has already had some discussion. I guess it's one of those
> things where we know what the ideal goal might be but, for now, you have to
> use what works. Is that a fair statement?
>[/color]
That's where I am now... In my mind, neither CSS (in its current
incarnation) nor Tables (ever) were meant as a layout device. I try to use
CSS as much as possible, but sometimes the CSS "hacks" you need to get
certain layouts are more convoluted than the "hackiness" of just using
tables. Just make sure you know, if you're going to want a
tightly-regulated layout, where the flakiness lies on certain browsers'
implementations of both Tables and CSS. Something done up for IE might look
like a car crash in NS4, NS6+, or a W3C browser, or vice versa.
[color=blue]
> PHP vs. DHTML might be where I show my ignorance. As I understand it, I can
> use PHP to, among other things, intelligently alter what content is shown on
> a page based on a state variable or something like that. Where I got
> confused was when speaking to a web guys he threw out a single statement
> "You might want to think about DHTML".
>[/color]
Well, that's a pretty right-on definiton of PHP you've got there... it
basically works after you write the text file on the server, but before
anything gets sent to the viewer. You can use scripting methods to change
what actual *code* gets sent to the viewer's browser.
DHTML is a completely different animal, not even "versus" PHP, really. It's
basically the JavaScript "interactive" end of CSS. It allows you to move,
manipulate, and work with the CSS objects you have. All DHTML, along with
JavaScript, Java, CSS, and HTML get sent to the viewer as a plain-text
file, and the viewer's web-browser does all the computing and rendering.
This brings the problems of browser versions back into play, as well as the
"What if they have JavaScript disabled" problem.
An interesting thing is, since JavaScript and DHTML are straight-text, you
can use PHP to dynamically *write* JavaScript code, although that's a
heavy-duty headache-and-a-half in a lot of cases.
[color=blue]
> Can someone point me to a discussion on where the different technologies fit
> in today's web design world? In other words, when you set out to build a
> non-trivial website, what technologies are chosen for the various aspects of
> that site, why and how are they used?
>
> Thanks,[/color]
-- Rudy Fleminger
--
sp@mmers.and.evil.ones.will.bow-down-to.us
-- (personal replies should at least be mirrored to email)
-- (include "Hey!" in the Subject line for priority processing)