Sinatra

Riley Redfern
2 min readDec 14, 2020

Phase 2 brought me the opportunity to learn the Sinatra framework, how it works with ActiveRecord, and understanding the basics of MVC. Although comparing this app to the CLI project is a little apples/oranges I can say with confidence that I much preferred Phase 2. Seeing the changes I made to my app in real-time in the browser was absolutely incredible for my comprehension and retention.

An important difference in this process was using my own database structure as opposed to pulling from an API or scraping a website for data. Also, having access to the Corneal Gem in order to simplify the setup of the project was a really great option to use and is definitely more in-line with what I assumed ‘building an app’ was going to entail.

I’ll start by going through the most challenging aspects of this project and I’ll talk about my favorite things later. I had a really difficult time understanding a lot of what database tables were meant to look like from a theoretical standpoint. Until the moment I had migrated my own tables and seed data I was pretty much operating on faith. As soon as I did, though and was able to see the schema it was a lightbulb moment. Also, something that gave me a lot of trouble was the setting of a sessions key. I understand that it works but I’m now tasking myself with further research to solidify that knowledge.

Conversely, I really enjoyed setting the routes to the views pages just because they made ‘sense’ to me for the first time. The basic HTML in the views pages has gotten me looking forward so much to the front-end units upcoming. Also, having each controller page separate for its own ‘job’ is enormously satisfying because everything has its place.

I guess my main takeaway from this project is how excited I am to move on to a bigger framework because it wasn't such a stretch for me to finally see the ‘why’ behind each aspect of this build. And again, seeing my work in the browser has taken my mind to a place where I’m starting to envision things I can create in the future.

--

--