Wednesday, August 25, 2010

iOS - Accessing web services easily, now with blocks!!


The iPhone SDK 4 brought to us some very neat features. One of the most awesome and powerful are blocks.  
Blocks are like small procedures, that you can use as parameters to methods.
These structures exists already in many scripting languages, as ruby and python, and now we can also use its powers in ours iphone applications.
When we need to communicate with web services, we know how painful this task may be. Asynchronous operations, delegates, parsing json and xml responses. There are a lot of libraries that handle these tasks. I’ve commented already about a JSON parsing library here. But this library just parses JSON. It does not handle accessing the webservice, or error responses.
For that, i’ve found a great project hosted on github, called Seriously, that handles all of the tasks, and it uses blocks to simplify our code.

Continue reading on my tumblr

No comments:

Post a Comment