One of the things that’s always scared me about the whole Ajax thing was I figured I wouldn’t have any hope of making since of it all. That was until I realized how god awful simple JQuery actually made things.
I heard about the library before, but I had never actually tried to use it. I figured that it was going to be complicated as sin. That the PHP needed to pass XML would make me want to vomit. So much to my surprise, when I discovered that JSON could be passed back and forth and JSON was little more then a glorified multidimensional array (to the common man, I’m sure it’s quite fancy)
I setup a PHP page, give it some settings to listen for (using Jquery’s $.post function), query the database based on what it was sent, and then all I had to do was encode that data in an array and feed that to something as simple as echo json_encode($array);?
Holy balls if someone had told me it was this easy I would have been doing this so much earlier. Now I’m still stumbling as I start to have to learn where it’s good to summon a new page verses where it’s ok to simply make a JSON call and replace an element of the page. How that affects user navigation, etc. But it’s been a lot more fun than I thought it would be. Honestly the toughest part has been deciding what kind of views I want in the database for the various query’s that I need to run.
I guess I’m just putting this out here to say if you were hesitant about starting to do “AJAX”, it really is NOT bad. It’s incredibly simple with the jquery library and had I know how much simpler like I said I would have been doing this 5 years ago.
Really the lesson to take away from this is don’t be afraid to try something new, it might just surprise you.