A few days ago, I wrote a lengthy post on the official ASP.Net forums where I discussed some thoughts on a new version of the CSS-friendly ASP.Net control adapters. In the post, I outlined some new approaches to improve testability and configuration.
Since that post (written on the evening of Sept 16), there have been no replies, which leads me to consider a few possible realities…
- No one reads the ASP.Net forums. (Not true; the post was read at least 79 times, as of this writing.)
- No one posts on the ASP.Net forums. (Not true; other posts were written since my post.)
- No one uses the CSS Friendly adapters. (Not true; they have been downloaded over 1,800 times in the last week, according to CodePlex — making it the 14th most popular CodePlex project in that time.)
- No one cares about rewriting them.
- No one who cares about rewriting them reads the ASP.Net forums.
OK, so either no one cares about improving on what we currently have, or no one who cares saw my post. Which is it? Do you use the CSS adapters? Would you use them if they were improved?
0 thoughts on “Rewriting the ASP.Net CSS Friendly Adapters – does anyone care?”
I’ve done quite a bit of work with the adapters and have a few suggestions that would make them more useful.
– the first point is that they shouldn’t even exist. The standard ASP.NET server controls should not be emitting such shocking HTML that for those of use trying to build accessible sites we have to consider re-writing them. So from the outset, spending time on the adapters does seem like a bit of a bandaid. But that aside, and assuming this won’t change…
– I built an adapter for the Wizard control a while back (on my blog) and one of the trickiest aspects was to get the events wired up correctly. You had to make sure you got the names of containers and their child controls exactly right otherwise nothing would work. This could be either more clearly documented or simplified.
– I’ve often looked at the output of a control and wanted to change one small aspect of it. This isn’t really possible with the adpaters – if you want to change one small thing you have to take on rendering, styles, events etc. for the entire control. For complex controls this is time consuming and error prone. I’d love to be able to control aspects of a control’s output.
– I agree with you, better documentation is a must.
I agree that the standard ASP.Net controls don’t render great markup. One very nagging point: If you use an ItemTemplate in many controls (using your own markup entirely) they still wrap your code in a TABLE. That sucks. However, I highly doubt the current rendering of the controls will change — partially due to the issue of breaking changes, and partially because I think “good enough” is probably good enough for Microsoft, at least in this area.
Wiring up events is the tough part (and an issue of the postback model more than rendering), which is why I wanted to separate HTML rendering from event wiring in the rewrite. Makes testing and isolating problems easier.
Interesting thought about modifying “small parts” of a control. However, that could be a complicated thing to implement. To do it, you’d need complex controls (such as a Wizard) render a well-defined (and well-documented) control tree which you can then modify before rendering. That being said, a complex control should work that way in the first place… 😉
Your comment, combined with one reply to the original post on the ASP.Net forums, gives two responses. Not a huge compelling reason for me to undertake this effort, but I’ll leave the idea on the table if the need resurfaces, or if demand appears.
John Dunagan says:
Sorry I came late to the party, but I already spewed on the indicated forum at ASP.Net. I’m gonna double-dip and say that yes, please, consider undertaking the effort. And I agree with Tokes whole-heartedly – this shouldn’t need to happen, but yet it does.
Just remember, three (responses) is a magic number.
I’m gonna work on this, too.
President – SW Florida .Net Developers Group
Well, you guys inspired me enough to do it. 🙂
I’ll comment more on the ASP.Net forums.