Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

These libraries exist because iOS (IMHO) is too low level in places, such as HTTP requests. There is an interface you have to implement in order to make HTTP requests, and you have to handle all the data (bytes) that come in incrementally. It is very handy to have a library that handles the connection, caching, redirects, errors, etc.


The NSURLConnection class is actually pretty high level and does in fact handle things like caching, redirects, errors, etc. for you. I have been using ASIHttpRequest for a while -- it's not bad but can feel quite heavy at times. For future projects, I may roll my own HTTP lib by wrapping NSURLConnection directly. Btw, GCD and blocks in iOS 4 make it super easy to structure your network calls the same way you would in JavaScript with xmlhttprequest and closures, which makes async code much cleaner and easier to write.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: