A few things I learned…

Erin Cola
2 min readJan 14, 2021

I have just completed project number two in Flatirons curriculum for software engineering. It was an app using Sinatra and Active Record. Though my project page isn’t the prettiest as far as style goes, which I will get better at later, the more important lesson was understanding what MVC meant.

At first, as most things, the term meant nothing to me. The M stands for Model, the C stands for Controller, and the V stands for view. I learned that behind the scenes of a webpage or app, MVC is what makes the whole process work from the user to the database and back to the user. Understanding that the Controllers are basically the receiver and runner of information between a database and a user. They take input from a user, and the controller retrieves some data then send that data back to the user. Like in a restaurant, the models are the chefs, the controllers are the servers, and the users are the views.

Another big thing I learned was the importance of using pry to debug. I had learned about it prior to this project, but it was through working on this project I really understood how to use and utilize it in my terminal. You must require ‘pry’ in your gemfile. Then whenever something appears to be breaking or not working quite the way you’d like, you can type ‘binding.pry’ under the line of code in question. In this project in particular because it was a web app, you go into your terminal that is running your server while the browser is refreshed. It will map out for you exactly where the issue is going wrong. You can also test out what gets returned when you call your methods on classes or your instance variables. I realized just how useful of a tool it is during this project, especially with the constant back and forth between the model, controller, and view files I was creating.

--

--

Erin Cola
0 Followers

My name is Erin and I am super new to the tech world, and also so excited and eager to become a part of it. :)