[thelist] [ASP] newbie resources

Alex Ezell taranis at spittingllamas.com
Fri Nov 15 13:55:01 CST 2002


On Fri, 15 Nov 2002 18:09:33 -0000, Jason Handby <jasonh at pavilion.co.uk> wrote:

> Another big advantage of doing it this way is that, if you edit the page
> in
> Dreamweaver, you'll only see one div element appearing in design view
> (which
> is presumably what you want). Dreamweaver reads the page as if your ASP
> is
> just blocks of stuff it should preserve but ignore -- it (obviously)
> doesn't
> process loops and conditionals in your server-side code. So for example I
> avoid doing things like this (rubbish example):
>
> In other words, try not to put tags inside loops or conditionals if doing
> so
> will confuse your editor. I only mention this because I wish I'd thought
> of
> this sooner when I started out! :-)

I have a  problem with this kind of statement.

Does it really make sense to write your code in a way that your visual
editor can make better sense of it? I don't think so. If the application
calls for having tags inside conditionals, then that's exactly what you
should do. Set up a local server and test your files there rather than
relying on Dreamweaver's poor visualization.

In the simple example you gave, it makes sense both in DW and in coding
standards to it your suggested way. However, I would highly discourage this
"make it work in Dreamweaver" mentality. It seems to give the impression
that the result, that is, the visual result, is more important than the
method of achieving that result. Maybe I'm being nit-picky, but this seems
like a distinction that should be made clearly, especially for someone just
learning to write code, because bad habits die hard.

Another thing to think about is that the less you rely on table-based
layouts, the less problems you have including HTML in your ASP.

--
Alex Ezell
http://www.spittingllamas.com
"Formal Restrictions, contrary to what you might think, free you up by allowing
 you to concentrate on purer ideas."
- Winter Sorbeck in Chip Kidd's The Cheese Monkeys



More information about the thelist mailing list