A second sinatra cms project

Derek Le
2 min readMay 20, 2021

After my first assessment, I wasn’t as pleased with my project and felt like I didn’t really have as strong a grasp on the concepts learned in the second phase. I was allowed to go back and build another project from scratch, and this time around I felt like I now have a much better understanding of how everything works.

For my second iteration, I built an app that mimics a ‘marketplace’. Users can sign up, list products with associated prices and quantities, add funds to their account, and buy products from other users. While simple on paper, I quickly learned managing all of the information necessary was a lot more work involved than initially thought. One of the biggest features was rendering a table that could dynamically populate it’s information based on arguments passed in when rendering a page. This was an improvement over my last project, and allowed me to create only one shared table view that any other view could call upon when needed.

Initially when creating this app, I thought just having a ‘quantity’ attribute attached to an object (product) would suffice. However, I later realized I needed to have a separate instance of each product for however many there was in the marketplace. This was because while there could be 100 oranges, each orange could vary in value and seller, and needed to be distinguishable between each other. This then made it so my tables representing all available listings to be massive, and I had to rewrite the code to only write products of unique attributes per row.

When building the workflow of this project, I wanted to implement a ‘cart’ stage where a user could add products they were interested in but haven’t bought yet. My idea for an object’s flow from user to user would be something like this:

This however brought more scope creep than anticipated, and I had to prioritize deadlines before all else.

With this second take on my sinatra project, I think I will be much more prepared for my assessment and beyond. While my app alone may be robust and without much use, I think it’s concepts can be implemented across many platforms in the working world.

--

--