Full-Stack Follies

A personal blog about learning full-stack web development.

Bootstrapping a CrowdFunding App Pt. 2: From Rails App to Asynchronous dApp

In Part 1, I talked about creating the backbone CRUD functionality of ThingFunder (creative name, I know) in Rails. I revisited the project recently as a learning exercise to try out some new tech. In this post, we’ll take a look at the crowdfunding problems that I’m interested in trying to solve, go over how I used Web3.js (via Metamask) and Solidity to add Ethereum smart contract functionality, and look into bettering the user experience by using AJAX/jQuery and the Handlebars templating engine to make the app load data asynchronously.

On Higher-Order JavaScript Functions, Closures & Encapsulation

“It’s functions all the way down.” - Ancient Internet Proverb

Understanding Basic JavaScript Gotchas

As the internet becomes increasingly integrated with the world outside of just the desktop, the “language of the web” becomes even more relevant. Though when I first started learning JS, I had a tough time understanding why the language had become so widely adapted. It had a bunch of weird quirks that would continuously plague the codebases that I worked with, such as conditionals returning ‘true’ for things that I knew should’ve been ‘false,’ and variables strangely not being defined or defined as something unexpected in my function calls. After some reading and a lot of coding, I started understanding why these things occurred, and that understanding gave way to good coding patterns, and exposed how fun/powerful JS can be.

On Dependencies and Deletion of ActiveRecord Objects

One unexpected error that I encountered while working on my first Rails app was in implementing a delete feature. Basically, the ActiveRecord ORM would not allow me to delete the model instance that I wanted to delete, and threw an exception like this:

Programming Principles: The Law of Demeter (LoD)

The Law of Demeter visualized, beside The Greek Goddess Demeter, where it gets its name