HTML, CSS and Other Curious Stuff That You May Find Hard-coded In Your Web Application
Design View Dude is asking interesting questions about composing HTML/CSS mark-up in the process of building a .NET Web application.
Ok, I may be a little too radical on this, but IMHO the controls should emit as little HTML mark-up as possible. Ideally, none. I am puzzled at how such great concepts as XSLT and XML-driven rendering are completely (well, aside from the Xml control, which doesn’t really count) ignored in the .NET strategy of building Web content. In proper development environment, the producer of HTML code (the one with visual design skills), and software developer (the one with application architecture skills) are rarely the same person. It would be only logical to keep their activities separate.
So, if you ask me, I would like to see framework built in such a way that content (this includes UI) is emitted in XML, which then can be freely shaped into desired context using XSLT.
That way, we don’t have to worry about script being injected in the wrong place or mark-up being non-XHTML-compliant.
Similarly, we don’t have worry about application developers designing the presentation UI and HTML being hard-coded into the logic of the software.
It will also ease your job in developing visualizers for the development environment — all you need is a test harness stylesheet, which takes emitted XML and creates a usable Web application out of it.
Think about it — skinning and tweaking the look and feel would no longer be connected to the application development cycle.