Syncing with Javascript

Posted by Richard Sanchez on April 17, 2019

One of the biggest challenges I faced moving into the Javascript portion was understanding the syntax and styling of a new language. Up until now, moving from the CLI project, through Sinatra, and Rails, everything has felt like a natural progression. Javascript was incredibly frustrating at first because it didn’t look like Ruby and didn’t have the same “magic” as Rails.

At the same time, Javascript was also something that I was very excited to begin learning. The ways in which we access and navigate the web relies heavily on Javascript and it’s functionality; it allows us to have a much more dynamic and ultimately exciting web experience. As I was working through my issues with JS, learning the syntax and the logical process of a JS function was challenging. It wasn’t easy to keep track of all of those anonymous functions! I had to remind myself of what the purpose of JS is and what I was trying to enact.

I found it helpful to think of Javascript as a bridge between back-end and front-end frameworks, as something that linked and operated between my Rails application and the CSS/HTML with which the user interacts. Part of this process involved implementing CSS and HTML as the “architecture” of the webpage, rather than just as stylistic choices. By giving the HTML of a page more structure, I was able to visualize how Javascript is used to manipulate the DOM.