When thinking of ideas for the Sinatra assessment, I wanted to make something that I could help me out personally. The idea came to me while staring at shelves of records in my living room. I built a simple RESTful app to catalog a collection of stuff, in this case, records. It could be adapted to catalog pretty much anything.
It’s sort of like a dumbed down version of the discogs.com platform, that allows users to store, rate and list the records they own. They are also able to see what other users are adding, but only edit and delete their own music. Watch a walk-through.
Beyond the obvious RESTful routes and user authentication part of it, it was an exercise in UX patterns and what goes into building them. My limited skills prevented me from adding more features that, as a user, I’d seek out in a cataloging app. Eventually, I’d like to have it be adaptable for any sort of collection be it books, comics, Magic: the Gathering cards, you get the idea. Check it out on github.
This is my first ruby gem. It simply lists new DVD and streaming releases in a CLI with options to view more information about particular releases.
I had no previous exposure to gem building and was a tad immobilized at first. Lucky for me and fellow ruby learners, I found several great resources to guide and hand-hold along the way.
My biggest hold up was getting my brain around data distribution from third party sites. The requirement of this assignment was to scrape a webpage data using Nokogiri. I started off that route but found that the movie data was dynamically generated and wasn’t scraping. I was getting empty elements.
After some quick research I found Watir WebDrive could help grab dynamically generated data. But it had to do it by opening a browser instance. Since this doesn’t make for great UX, not to mention defeats the purpose of making command line gem, I was back to square one. After some more digging, I read that the best option most of the time is to inspect the page to grab the data feed’s url. That’s what I ended up doing. It admittedly took me a long time to find it, as the page loaded a great deal of scripts.
For next time/things I learned:Make sure the data is accessible and ready to use before starting. I wasted a lot of time setting up everything thinking the data would be just fine. It worked in the end, but not seamlessly as I first thought.