w6d5 - Clean pages with the power of AJAX
Week 6 done! It’s hard to believe that we’ve already been at this for 6 weeks, and when I look back at the things we were learning then, it seems like it was so long ago! To wrap up the javaScript curriculum, we spent the day playing around with AJAX requests, which allow you to make asynchronous data requests to the server. This essentially means that you can submit and request data in the background while your application remains undisturbed. This doesn’t really seem like a big deal until you realize that it allows you to update your application without having to reload or redirect to a new page. This enables you to do things like display search results that update as the user types, which is pretty damn cool.
The day started off a little rough, as we were still not super familiar with jQuery, which is an important part of handling AJAX requests. Then you add AJAX on top of that and it just introduces a whole new set of things to think about. However, once we got warmed up, we were able to see just how beneficial using AJAX can be to an application. Our project was to build a mini version of Twitter using AJAX requests instead of traditional page loading. This meant that when a user posted a new tweet, the page automatically fetched the new tweet and displayed it on the page, without ever having to reload. We were also able to implement a real time search bar, that searched through all users with each keypress and displayed the results immediately. There was also my favorite feature, which was the character’s remaining counter, which again, updated in real time. It’s amazing how small things like that can make a big impact on user experience and it’s something I will keep in mind once we get to our final projects.
Speaking of which… it looks like we will be choosing our Final Projects this week, so that should be pretty exciting! But first things first, we need to get through a week of Backbone, a javaScript library that sort of ties everything together that we’ve done so far. From the looks of it, it’s basically a client side MVC, which should work well to compliment the server side MVC that we’re familiar with from Rails. Hopefully it’s that simple (but I know it won’t be)! Week 7 is under way…