Okay, so there has been alot mention about AJAX (Asynchronous JavaScript and XML) recently. The basic principle is that you can perform SQL queries without redirecting to other pages, and simply refreshing an area of the browser. Well, I thought I’d jump on the band wagon and develop some AJAX for an internal project at work. Its a bit hit and miss really, solving one error caused another, but thats my lack of experience shining through, and i’m sure next time I do it, it’ll be smoother.
My AJAX… When a user enters a new job into our brand spanking (still under development) new system, they have to insert a client. This causes problems, as for example douglas, Douglas, and Doug are all different entities but could mean the same client. If entered into the system in this way, it causes problems when bringing up lists of all the clients’ information, or previous jobs etc.
So, i could just query the database and build a drop down list of all the clients currently in the database, but then i’d also need an input box if the user wanted to add a new client. If that input box were not available, it would mean the user having to enter all the client information before having to input a job (which will make the uptake of the system slower). In steps the future. I now have one input box that the user can put anything into, but as the user types, the system queries the database on-the-fly and creates a list (updated with every key press) that lists all the current clients matching what the user is typing. Rather fab. This means also, that the user can input a new client, and it’ll be flagged up when the job comes to be invoiced if the rest of the details (i.e. address, contact number etc) haven’t been filled in.
In short… AJAX is rather cool, and although this is a rather trivial and small-scale implementation, I think it will certainly have a place in future applications !