Re: XML over CSS
"Chung Leong" <chernyshevsky@ hotmail.com> wrote in message
news:sNedncBMW_ L_4G7dRVn-ug@comcast.com. ..[color=blue]
>
> "Chris Hope" <blackhole@elec trictoolbox.com > wrote in message
> news:1089607523 _1604@216.128.7 4.129...[color=green]
> >It depends how you code your PHP. But generally when people code the HTML
> >output in the PHP you often end up with a lot of HTML and PHP being mixed
> >up together with database calls in the middle of the HTML output. There's
> >not necessarily anything wrong with this (and I've done it plenty of[/color][/color]
times[color=blue][color=green]
> >in the past) but it is nice to separate that stuff from the output. Using
> >XML/XSL enforces the separation.[/color]
>
> Well, if you look at it from the another prospective, a technology that
> forces you to do things in a certain way takes away flexibility.[/color]
That is true, but there are supposed to be trade-offs. In order to provide a
RAD (Rapid Application Development) environment you need to make as much use
of reusable code as possible. This gives you speed of development as you
don't have to rewrite the same code each time. The trade-off is that when
you use a resuable module you are stuck with what that reusable module does
or the way that it does it. If you want to do something different to have to
write a new module. So there is a trade-off between reusability and
flexibility. The trick is to provide modules that combine both, but not many
programmers can do that.
[color=blue]
> It's worth remember that while it's nice to separate logic from
> presentation, that in itself is not the goal, or even a goal. The[/color]
objective[color=blue]
> of programming is to create software that does something useful. An[/color]
obvious[color=blue]
> truth but a surprisingly large number of those in our field seem not to
> understand it. A lot of beginners, espeically, suffer from what I call the
> "CS syndrome." They just sit around trying to come up with code that
> demostrates a particular technique, technology, or principle--precisely[/color]
the[color=blue]
> kind of code that you find in programming books.[/color]
How true. What is even worse is that some senior programmers follow a
technique or paradigm with almost religious zeal. They think that their way
of doing it is "the only true way" and that anyone who attempts to adopt an
alternative method is a heretic. Their approach is dogmatic (follow the
rules and damn the result) whereas mine is pragmatic (achieve a result
regardless of the rules).
--
Tony Marston
"Chung Leong" <chernyshevsky@ hotmail.com> wrote in message
news:sNedncBMW_ L_4G7dRVn-ug@comcast.com. ..[color=blue]
>
> "Chris Hope" <blackhole@elec trictoolbox.com > wrote in message
> news:1089607523 _1604@216.128.7 4.129...[color=green]
> >It depends how you code your PHP. But generally when people code the HTML
> >output in the PHP you often end up with a lot of HTML and PHP being mixed
> >up together with database calls in the middle of the HTML output. There's
> >not necessarily anything wrong with this (and I've done it plenty of[/color][/color]
times[color=blue][color=green]
> >in the past) but it is nice to separate that stuff from the output. Using
> >XML/XSL enforces the separation.[/color]
>
> Well, if you look at it from the another prospective, a technology that
> forces you to do things in a certain way takes away flexibility.[/color]
That is true, but there are supposed to be trade-offs. In order to provide a
RAD (Rapid Application Development) environment you need to make as much use
of reusable code as possible. This gives you speed of development as you
don't have to rewrite the same code each time. The trade-off is that when
you use a resuable module you are stuck with what that reusable module does
or the way that it does it. If you want to do something different to have to
write a new module. So there is a trade-off between reusability and
flexibility. The trick is to provide modules that combine both, but not many
programmers can do that.
[color=blue]
> It's worth remember that while it's nice to separate logic from
> presentation, that in itself is not the goal, or even a goal. The[/color]
objective[color=blue]
> of programming is to create software that does something useful. An[/color]
obvious[color=blue]
> truth but a surprisingly large number of those in our field seem not to
> understand it. A lot of beginners, espeically, suffer from what I call the
> "CS syndrome." They just sit around trying to come up with code that
> demostrates a particular technique, technology, or principle--precisely[/color]
the[color=blue]
> kind of code that you find in programming books.[/color]
How true. What is even worse is that some senior programmers follow a
technique or paradigm with almost religious zeal. They think that their way
of doing it is "the only true way" and that anyone who attempts to adopt an
alternative method is a heretic. Their approach is dogmatic (follow the
rules and damn the result) whereas mine is pragmatic (achieve a result
regardless of the rules).
--
Tony Marston
Comment