Guffa wrote:
> "Mike Brind" wrote:
>
> >
> > Why not?
> >
>
> Because you can completely separate the HTML markup from the executable code
> in ASP.NET. This means that all the code can be compiled and type safe.
>
> When converting from ASP to ASP.NET it's usual to see <%=...%> tags in the
> markup (I have been there myself). Code like that is harder to follow and
> harder to maintain.
Exactly what Bob said. And the bit about making it easier for
designers and coders to work on the same project? Every designer I
know who has seen what VS produces has shrieked in horror at the
thought of ploughing through all those server control tags,
EditItemTemplates etc.
For the vast majority of web applications, an OOP approach is overkill.
A web page typically executes in about half a second or less, and then
dies happily. You can use sessions, databases, text files or cookies
to maintain some kind of state between pages, but web applications are
not all about RAM-resident objects that might need to live for hours or
days, undergoing all kinds of changes in state.
Good programmers who are used to <%=...%> or <?php...?> don't find well
crafted ASP or PHP files difficult to follow or maintain, any more than
those who are used to Public Class Whatever ...End Class will be
comfortable with Code Behind.
And the bit about code being compiled and type safe? So what? So an
aspx page might run a few microseconds faster than an interpreted
script-based page. No one except the sysadmin will notice in the vast
majority of cases. Please note, I'm not talking about Yahoo or Ebay.
I'm talking about the huge number of B2B sites that have niche
audiences and page impression counts of less than 1 million a year,
which probably make up about 70% of all web sites.
Not that I have anything against ASP.NET. I'm learning it myself, but
if ASP is ever dumped by Microsoft, PHP is an equally valid alternative
for the kind of work I do.
Time to clamber off the soap box now.....
--
Mike Brind