All articles tagged as:


Modularizing And Organizing Javascript Using Data Attributes

The most common way that people use to add javascript behavior to a page is using the $(document).ready() event. In this small post I'll describe a simple way to make these small behavior scripts more modular and reusable. Multiple Ready Bindings Binding all small javascript behavior to the ready event has the advantage of simplicity. It is an easy approach to master and put in practice. However, this solution has a few problems. Let's take a look at the following code to discuss the disadvantages of this solution: $(document).ready(function() { var $cpfInput = $(".js-input-cpf"); var $pho…

Read more »

Introduction to ReactJS + Flux with Ruby On Rails (Part II)

In this part of the ReactJS + Rails tutorial we're going to setup our simple chat project and discuss the concepts covered on the first part of this tutorial. If you missed the first part of this tutorial, feel free to go back to and learn the basic concepts of ReactJS and Flux. All the code presented on this tutorial is available on github: Project Setup First of all, create a new rails project with the command rails new react_chat. Next, add some gems necessary for this project: gem…

Read more »

Introduction to ReactJS + Flux with Ruby On Rails (Part I)

I've been wanting to play with ReactJS + Flux for a long time and finally got some time to implement a simple application using this framework alongside with Rails. It is being a fun experience that is worth to share to other web developers interest in learning about ReactJS. In this tutorial I will explain how ReactJS works and will show how to use it with Ruby On Rails with a simple example: a chat application. A brief history of ReactJS ReactJS was created by Jordan Walke, a software engineer that works on Facebook. He was heavily influenced by a PHP component system used by facebook and b…

Read more »