“When a design is more complicated than it needs to be, that’s a sign of an inferior designer.”
- Jamie Hyneman
Today I was fixing a bug with an autocomplete field. The user was supposed to be able to type a customer name into the autocomplete field and then choose from a list of customers, but for some reason the list of customers wasn’t showing up.
When I started diving into the code, I noticed that even though the page in question already had a complete list of customers, the developer had the autocomplete doing a totally separate ajax request to grab the customer list. Utilizing the existing list of customers would have meant less code and an instantaneous autocomplete field, but for some reason the field was ajaxed.
I see this kind of thing all the time. It must be that developers are all psyched to use ajax wherever they can, and sometimes they use it where it’s not needed. In this case ajax was even worse than pure JavaScript.
Just because you can use a fancy tool doesn’t mean you should.