DBC Phase 2, Day 11
This past weekend was extremely productive for me. Not only did I get a large chunk of my Phase 2 final project finished, but I also went to a birthday party where I received some excellent advice (and made several good connections) from professional computer engineers. Some of it conflicted with what I’m learning right now, but it was still valuable to hear different viewpoints. My final project now has a functioning API that connects to Imgur, allowing me to upload a photo anonymously to their database and display it on my app. Not amazing by itself, but still pretty neat that it all works as it should.
Today was a little frustrating in terms of completing the challenge, mainly because the instructions were a little confusing. We’re getting into APIs, which is essentially the ability to get access to databases of large companies and use that data on for whatever purpose we want. If I wanted to use Twitter’s API, for example, I could let a user login to my site with their Twitter credentials, let them tweet from my site, allow them to view images of a particular user, etc. Most major companies have an API available, and even the government has made large amounts of data available to the public through APIs. One of my cohort-mates is making an app based on recent census bureau data, for example.
Anyway, this challenge wanted us to create an API, not consume one, so we had to go through the steps of creating a regular Sinatra site. However, instead of making pages that displayed the data, we needed to create routes that when called, would send the data back for the user to manipulate. This was not immediately obvious to some of us, so we spent some time creating some basic routes before figuring out how to lock the data up and provide a randomly generated access key. In the end, we couldn’t complete the challenge before the end of the day, but got the idea of what needed to be done.
After 6, I immediately went back to my final project. My API works, I have a working site, and the data all seems to work. After talking with a teacher today, though, I’ve decided to add another API in order to flesh out the app a little more. I’m thinking about using an automatic emailer to welcome a user and share their final scores once they complete a quiz, but we’ll see.
I still need to figure out some AJAX calls for it, but I also still need to figure out AJAX. Also, it’s super basic right now, so I’ll add some CSS later to make it prettier.
Until tomorrow, I’m Edwin Unger, and I’m a web developer in training.