Day 9 at Mobile Makers (Dictionaries, API, NSUrlConnection)

After an extend memorial day weekend, we were back at it at Mobile Makers and we focused on API’s. API stands for Application Programming Interface and it is a way to access data from a website like Instagram or Twitter etc… In order to do this in Objective-C, you must first declare a URL then declare a request. From there you can connect to the API and get information. Depending upon how the API is set up, it could either be a Dictionary or Array or a combination of either or both. Today we used MeetUp.com’s API and it was a Dictionary of Array’s with more dictionaries within. This was a little hard to wrap my head around at first but after thinking through the problem and getting a little help along the way from Don, I got it.

A random thing I learned today is that the cell of a UITableViewCell has its own image property that you can access when populating a UITableView and this allows you to put a nice image on the left side of the screen.Today we also really focused on dictionaries and basically they have “key” “value” pairs. So the key could be name and the value of that name is “Blake.” This is a way to reference large quantities of data and is really useful. The syntax is a little weird at first because they use {} braces instead of [], but after awhile, it becomes second nature. We accessed MeetUp’s JSON data this way today and using array methods as well.

I met with Kevin today and he showed me what the Model View Controller (MVC) is all about and I am going to start working on a side project under his mentorship to start focusing on MVC. I am going to do a matching game and it should be a lot of fun.

-Blake

Leave a comment