FlatIron Mod 2 Sinatra Project

Denise Henderson
2 min readOct 27, 2020

For our Sinatra Project, we were required to build an MVC Sinatra application using ActiveRecord with Sinatra.

I decided on an Event Meal Planning application that would allow users to setup events and identify dishes they want to serve at their event. A user would have multiple events and events would list multiple dishes. We were required to establish data relationships in our models — at least one belongs_to/has_many relationship. I decided to use the belongs_to/has_many for my users and primary resource — the events the users will be creating. Additionally, I made use of the has_many_through to tie my dishes to events and events to dishes through a join table.

This project was challenging but I felt prepared and I felt like I had the resources from the labs that we worked through in Mod 2 of the curriculum.

I find html to be a bit challenging, primarily because there seems to be numerous ways to achieve the same thing. My experience has been that using the same language will often reflect differently from screen to screen or form to form. This was the most frustrating component of this project. My frustration stems primarily from the concept of expecting programming to be rules — based. When operating in a rules-based environment, I expect that if I follow those rules religiously, I will get consistent results. Furthermore, if something breaks or does not work, I can reliably expect that I have a syntax or logic error. My experience with html is that is not always the case. This created a tremendous amount of frustration for me.

After hours of struggling through some of these instances, I have determined that while rules and parameters may not always present consistently from component to component, there is always a reason. That reason may not always be accessible or apparent to me. I feel more equipped to work through these situations. For example, if something is not working and it looks identical to the same routine I have used in another situation, I will try to copy and paste that routine. If that creates the problem, or the problem persists, I will then free hand the routine. If the problem persists, I will find a routine that is working (preferably in the same form) and start changing elements of that form — one element at a time — until it works. I cannot always tell what the difference is but I can usually get my objective accomplished.

While I continue to be frustrated by the seeming inconsistency, I have become more resourceful when working through the challenge — which is a huge WIN in itself!!

--

--