Friday, December 28, 2007

Ah Progress - Sort Of

A lot of credit is due to scriptaculous this evening. And though I am pleased that I got a job done, I'm not happy about the way it was accomplished. I don't usually have many good things to say about scriptaculous. It seems to me that it is a whole bunch of code, that almost never works correctly in every browser. Additionally, though the point of their website is to show off the product, I can't stand the way that it navigates. Finding exactly what you want concisely and simply is neither concise nor simple. This was absolutely the case with the Ajax.Autocompleter that I managed to wrangle to my will today. Finding the appropriate documentation was difficult. Also it appears to work differently in IE, Firefox and Safari. Because the feature was for an in-house, IE only application I didn't stress too much about the differences between browsers. However to make it work perfectly for IE, I did have to hack the script according to some advice I found on the scriptaculous wiki. At some point you have to weigh the costs of perfection, versus just getting the job done. I'm not usually an advocate for the latter but in this case for this set of users, I think that I'll just acquiesce albeit begrudgingly. At the end of the day the huge library was able to do something that would have taken me much longer to do on my own, though I am sure that had I invested the time to do it on my own, I would be more proud of the end result. I'm still a bit apprehensive about someone hitting the page with a non-standard browser. I know that company policy doesn't state that I have to support them, nor to I get paid to make sure that my code runs in every browser, but it's a point of pride for me. Generally speaking, I believe that if something is worth doing, it is worth doing the right way. That means that your code needs to be as nimble and flexible as possible, so that when someone decides that we are browser agnostic as a standard, I don't end up re-writing every piece of code.

There are a lot of big names using scriptaculous, which leads me to believe that my poor experience with the library may have to do with my naiveté. However, if you're the producer of a big library, wouldn't you want to be as clear and open as possible with your community. Yes, a wiki is open but something similar to a JavaDoc would be nice.

I guess I can't blame them, lots of big companies have a hard time making sure that their documentation is clear and easy to find.

No comments: