WDI week 3: jQuery, AJAX, databases and a tiny bit of Rails

JavaScript all the things

We started week 3 by reviewing and expanding on the JavaScript we began learning last week.

First up, jQuery. jQuery is a JavaScript library (basically a collection of bits of pre-written code) that lets you do cool things quickly. It's simpler than writing pure JavaScript, but this meant I felt like it was a little early to be learning it at this point, because I still barely had a grasp on the JS from week 2. I know there will be lots more opportunities to practice, though.

On Monday afternoon, we covered AJAX, which stands for Asynchronous JavaScript and XML. It lets you make quick, incremental updates to the user interface without reloading the entire browser page. This means fewer requests to the server, which is generally a good thing in terms of efficiency and user experience.

Tuesday was JavaScript review day, where we went over objects, callbacks, anonymous functions and the DOM in a bit more depth. Things are gradually starting to sink in. I think.

On Wednesday, we had a brief introduction to databases. We learned about the different kinds, discovered what schemas, foreign keys and joins were, and then played with writing a few SQL queries. I think this was all with a view to moving onto Rails later in the week, because you need at least a basic understanding of what databases are all about to use Rails, even if we are only going to be using its default SQLite database to start with.

On Thursday and Friday, we finally started Rails, the Ruby framework we're going to be using to build the majority of our projects. This began with a discussion about convention over configuration (a familiar concept from Sinatra that's also part of the Rails philosophy), as well as MVC, the separation of concerns that underpins all Rails apps. This stands for model-view-controller, models being the underlying logical structure of your app, views being the code that defines what appears in your browser (the stuff your users see and interact with), and controllers being the bits that connect the front and back end together, determining things like routing and what should happen when a particular action takes place.

We also talked a bit about RESTful routing and HTTP verbs, and finished the week by making a practice Rails app about planets.