Learn, Code, and Draw it Out


A blog that takes white boarding to the next level

Managing Store & State with React-Redux

While working on my final project in the online web developer curriculum I encountered more difficulty with Redux than with anything else.  The core problem was our requirement to use a central Redux store in order to manage state, while also utilizing a backend Rails API to sent & receive data.  I kept thinking to myself: ‘what do I need this central Redux store for!?’ I could just import data to a component’s state and make the necessary changes…then at another point in time, when editing some other thing, I could just hit up the server once again and ask for some fresh data and edit that data accordingly.


Hoisting & Scope in Javascript

Background


Organizing Javascript

One of the most frustrating aspects of this module (14) in the Flatiron curriculum was the total lack of any framework around Document Object Model (DOM) manipulation.  The adding & removing of DOM elements seemed to exist in a vacuum with no rhyme or reason to it.  This is either how things are done in the real world, or I assume there is some framework that solves this problem which I have not yet encountered. Either way, I came up with my own system for adding & deleting DOM elements that I’ll just call the builder-method. and used it on my front-end portfolio project here.



In my protfolio project, I have a DOM element called “pallet,” let’s look at the code for generating a single pallet in the DOM from this file here: ```javascript function createPallet(storageAreaID, palletId, palletName, timeScale, weightScale, firstItem, secondItem, thirdItem, weight, hazmat ){


How to Submit a form to a Rails API Created with Javascript or HTML

The curriculum for the front-end web development module has a lot of discussion about how to set up the index and show actions in the Rails controllers. We even learn how to refactor the information in these controllers using serializes. One thing I found consistently absent were discussions on how to set up a create action within the controllers themselves. In the Pokemon-Teams-Lab, we learn how to index, show, and destroy, but there is no discussion on how to create because of the odd-ball nature of how this lab spawns the actual pokemons; it’s a random process where the user does not choose to define any of the Pokemon’s characteristics, but rather, the Pokemons self-generate their own parameters using some online thingamajig.


Using Polynomials in a Rails Project

Background