Student Blog.

  1. Node.js + Socket.io: Building a Real Time Chat App

    totalgeorgie:

    Today I jumped on the node/socket bandwagon and threw together a in-browser chat app (reminiscent of IRC). Users would be able to chat into a chatbox, see a listing of all other users, set nicknames, and create and move between chatrooms.

    The technology stack:

    Node server, handling http requests…

  2. I Love Programming

    rjammal:

    We finished working on our Trello clone today. There were plenty of pitfalls and snarls and I hit a roadblock more than once, but even when I was stuck, I realized that I really love the work. There are definitely times when it is frustrating (this should work!), but today’s work didn’t feel…

  3. Trello, Day 1

    thejaggedhedgehog:

    Today we continued our recent emphasis on making things attractive and snappy on the front end by beginning a two-day mini-project in which we will clone Trello, complete with drag and drop functionality, modals, etc. As befits the theme of the week, we are using Backbone heavily, concentrating…

  4. W7D4 Bootstrap

    peterbardon:

    Today we learned about the Bootstrap framework for Web Development, which allows us to create beautifully styled web apps really easily. It creates a framework of Javascript and HTML/CSS that is quite easy to use to make all sorts of different webpages. This combined with Ruby on Rails makes it…

  5. jenniferchenio:


Rails Meets Backbone
As client-side applications have become more and more popular, so have client-side frameworks such as Backbone, Ember, and Angular. While Rails is great for traditional applications, where the majority of the work is done on the server, it does not provide many tools for developing dynamic single-page applications.
At first glance, it may seem a little redundant to use a back-end framework like Rails concurrently with a front-end framework like Backbone, since both follow the MV* pattern. In reality, the two actually have completely different responsibilities that do not conflict with each other.
In a nutshell, when used together, the back-end framework helps manage interactions with the database while the front-end framework helps manage interactions with the user.
I created the diagram above to give a high-level overview of how Rails and Backbone are able to work well together. The left-hand side is the server-side and the right-hand side is the client-side.
Going from right to left:
When a user interacts with the webpage, the client-side router calls the model or collection to fetch data from the server. On the server, the router determines which controller method should handle the request, and the controller method then creates a model, which is responsible for querying the database. The model then passes the data back to the controller, which renders it in an easily-parse-able format. The server-side router passes the response back to the client-side model, which is then fed into a view. The view uses this data to fill in the template, and renders the resulting html back to the client-side router. The html is then inserted into the correct section of the webpage without the page ever needing to reload completely.

    jenniferchenio:

    Rails Meets Backbone

    As client-side applications have become more and more popular, so have client-side frameworks such as Backbone, Ember, and Angular. While Rails is great for traditional applications, where the majority of the work is done on the server, it does not provide many tools for developing dynamic single-page applications.

    At first glance, it may seem a little redundant to use a back-end framework like Rails concurrently with a front-end framework like Backbone, since both follow the MV* pattern. In reality, the two actually have completely different responsibilities that do not conflict with each other.

    In a nutshell, when used together, the back-end framework helps manage interactions with the database while the front-end framework helps manage interactions with the user.

    I created the diagram above to give a high-level overview of how Rails and Backbone are able to work well together. The left-hand side is the server-side and the right-hand side is the client-side.

    Going from right to left:

    When a user interacts with the webpage, the client-side router calls the model or collection to fetch data from the server. On the server, the router determines which controller method should handle the request, and the controller method then creates a model, which is responsible for querying the database. The model then passes the data back to the controller, which renders it in an easily-parse-able format. The server-side router passes the response back to the client-side model, which is then fed into a view. The view uses this data to fill in the template, and renders the resulting html back to the client-side router. The html is then inserted into the correct section of the webpage without the page ever needing to reload completely.

  6. Week 7, day 1: backbone needed

    adventuresinappacademy:

    Today was dedicated to giving us a taste of Backbone… without backbone! In fact, we emulated some of the framework’s features ‘by hand’. I must say that while some of the other fellow students tend to dislike these “manual work” days, I really enjoy them. They allow me to achieve different goals:

  7. Killing Sheep and Taking Names

    thejaggedhedgehog:

    AJAX bears the name of not one but two heroes of ancient Greek myth, one of whom—the son of Telamon—ended a ten-year career as a Trojan war badass by going crazy, slaughtering a bunch of sheep (thinking they were his fellow Greeks), and then committing suicide. All motivated, of course, by a…

  8. W6D4 JQuery

    peterbardon:

    Today we learned about a library for Javascript called JQuery. JQuery allows us to select HTML elements and modify both their HTML and CSS properties. This gives us the ability to dynamically change our web pages and their appearance based on our Javascript code. Also, it gives us the ability to…

  9. Javascript User Input and Callbacks

    totalgeorgie:

    In many programming languages, program execution can be blocked so that the program can wait for user input. In Javascript, user input is typically handled asynchronously. Program execution continues immediately after invoking a request for user input and continues.

    Question: So how do we ensure…

  10. Week 6, day 2: advanced JavaScript

    adventuresinappacademy:

    Today we faced several cases of advanced JavaScript usage. I would say that the big subject was “how to deal with asynchronous”, since we had a nice introduction to callbacks and closures.

    The concept of closure can be summarised as follows:

    JavaScript functions internally store any variables…