I've just spent a few minutes trying to work out an issue in a colleague's website. I've encountered two issues. One is that he's deployed the website as a compiled site and he's never shared his source code with me, so looking at any of his code is actually impossible - so he'll have to sort his own bug out. It may be good practice to protect your intellectual property by compiling sites when deploying them to client servers, but I've never seen the point when the site is being deployed on our own servers that only we have secure access to - I'd much rather have the code easily accessible and fixable by anyone. No doubt someone will come in and tell me why this is a terrible idea, though
The second is in a bit of javascript handling. The first thing that struck me was that he'd written any javascript at all, since he's a dyed-in-the-wool WebForms developer and seems to hand off as much code writing to Microsoft as possible, so I'm not sure why he hasn't just added a validation to the element in question. The second was that he'd used document.all to grab a reference to the element. Now, I started web development in 1994, so I'd seen document.all before, but not for a very long time. So I did a quick google search. The top result in a google search for document.all is a page titled "Five Most Common Coding Errors". Here's what it says about people using document.all:
So, should I be concerned about it? Should I take my colleague to one side and suggest that he reads up on modern standards? Should I fix up his code in the mean time? Or should I just shrug my shoulders and let it be, given that I'm probably going to be made redundant in a couple of months?Use of document.all anywhere in a script is a clear indication that either the script was originally written for IE4 or the person who wrote the script doesn't know the latest Javascript standards.


LinkBack URL
About LinkBacks
Reply With Quote



