Struggles and Successes of The Sinatra Project

Erin Anderson
3 min readApr 2, 2021

I am so happy and excited and exhausted (but a good exhausted because I completed something huge at least to me) This is my second project that I would be submitting for flatiron school. I can finally say I created a Sinatra project.

When I first started my Sinatra project I first wanted to implement all these big ideas. But like most people who started their first local web server project they had all these ideas to start out. But after making my project super complicated (well not wasted because I learned from my errors) I ended up making my project super simple. I wanted to just hit all the requirements and truly understand Sinatra. So when it’s time to do rails I will have the foundation of it down already.

I created a web where “teachers” can go and create assignments for their “students”. Teachers would put the title of their assignments with the detailed description of the assignment for the students to do. My original idea was to have where teachers can create assignments and students can upload their completed assignments. I ended up having two tables one for users and the other for assignments. The user table had a name, email and password where the assignments table had a title and contents.

I will say making this project I struggled a lot when it came to creating the UserApplication routes. Authenticate, password_digest and has_secure_password had me stumped for the longest time. One blog that truly made me understand was Password_digest column in User migration table By Han Lee.

https://medium.com/@tpstar/password-digest-column-in-user-migration-table-871ff9120a5

Among a lot of other videos on youtube and research. Go ahead and test me on those three things I bet you I would pass.

So when going over the Sinatra modules I thought I knew the difference between an attribute and a parameter but little did I know when I started my Sinatra I didn’t know the difference. But now I can say with full confidence that attributes and params are somewhat different. I learned attributes are an object that describes something given an instance value. Whereas parameters are temporary variables that store a value when called and can not be created.

--

--