Saturday, May 07, 2005

A tech post at last!

ASP.Net 1.x flames:
I've been working on a asp.net web-site project which has to be cross browser compatible (it is supposed to support IE 5.x+ and Netscape 6.x+) and it is something which I never had chance of working on before on .net. Few things that I found out, the client side validation for asp.net validation controls don't work on Netscape or for that matter on any other browser except IE! (including Mozilla & FireFox) not that these "new" versions of mozilla based browsers don't support the latest Javascript standards but it's due to the way these validation controls spit out Javascript which is very very IE specific (and that btw doesn't follow any standard!). First of all the client script by these controls is only thrown if the browser is listed in Machine.config as a "supported" browser (even though mozilla based browser do support latest JS standards, the config file only has IE listed). Second problem is the way WebUIValidation.js is written which uses document.all (a feature only supported by IE, the standard is to use document.getElementById) to find a control on the form. Fixing these two is easy but that doesn't make the client script validation run on mozilla based browsers! the biggest problem is the little script block that is emitted by the base validator control (all the validation control extend it) on the OnRender event, which again uses document.all! So basically it's impossible to add client side validation for non IE browsers unless you're willing to extend the base validator control, override its OnRender method and write validation controls which extend from the custom validation control!
Second thing that I hate about ASP.Net 1.x is the Postback feature, I think GMail revolutionized the way postbacks are handled by using remote scripting. It's really illogical for the entire page/form to post itself back if the user changes a value in a dropdown list (can you believe it ASP.Net also has a server event for TextBox.Text_Changed, imagine the user typing a character and the page posts back, nice way of making sure that the users don't visit your site ever!!!). The good news is that MS has finally woken up with ASP.Net 2.0 and most of the control support remote script callbacks for e.g. the GridView (successor of DataGrid in 1.x) uses remote scripting to refresh the grid for sorting/paging. ASP.Net 2.0 uses XmlHTTP for remote scripting and the irony is all Mozilla based browsers have XmlHTTP built in whereas in IE 6.0 you have to use an ActiveX control. Hopefully IE 7 would have XmlHTTP implemented w.o having to use ActiveX and praying users would lower their security settings to allow ActiveX controls so that the page can function properly....MS are you listening?
Apart from the flames read a nice article on Google vs MS (http://www.fortune.com/fortune/technology/articles/0,15114,1050065-2,00.html) and the popularity of GDS, infact I myself am trying to build a plug-in for Yahoo!IM Archive: more or less there just have few frills to add..hope to have it rolled out at Sourceforge by next week some time.
PS: When would google wake up and add Category support for blogger?

No comments:

Post a Comment