Sweet Dreams are made of “this”

Erica Grundy
3 min readApr 13, 2021
Photo by Jaime Handley on Unsplash

Dreams Catcher, a Javascript application.

For my Flatiron JavaScript project, I decided to build an application related to something I am passionate about: Dreams and Goals.

I think that when we save pictures and descriptions of our dreams and look at them frequently, we force ourselves to transform them into goals, working to make them true. Most of the time, our dreams can become a reality, other times they can’t. But for me, the days go by lighter knowing that I have dreams to look for daily. Looking at them makes me feel alive, that I have a purpose in life.

In my project, a user can see all dreams posted, search for a dream by name, filter by a category, filter by achieved dreams, and can delete a dream. I also added a create action where the user can create a new dream with a name, a description, say if the dream is achieved or not, and choose a category for the dream posted.

JavaScript is a tough language to learn, but it can also do so many things. Separating the code in classes made it “look” like a Rails, so I used the similarities to fully understand and finally have that “A-HA” moment where things made sense. I struggled A LOT learning Javascript, so doing this comparison between JS and Rails really helped me out. I know that many programmers don’t separate their Javascript code in classes, but it really turns the code cleaner and easy to read.

One of my favorite things that I’ve learned in JavaScript is “this”. “This” refers to an object that is executing the JavaScript code. It has different values depending on where it is used: Inside a method, Inside a function, Alone, In an event, call()and apply(). A way to test “this” is console logging “this”. Along with Debugger, “this” is very helpful when testing out our code or verify if the output is what you expected. “This” is one of the many advantages of using JavaScript in an object-oriented manner. JS Combined with Rails on the backend rendering my APIs made it easier to build my application.

Photo by Prateek Katyal on Unsplash

Overall, I’m very happy with how it turned out. I enjoyed developing this application and increasing my knowledge of Javascript as I worked on it. It seems a lot to learn at first, but with time everything starts making sense.

If you’re interested in viewing or contributing to this project, check out the Github Repository here.

--

--