wit-ai / wit-ios

Wit.ai iOS client
Other
222 stars 71 forks source link

- reduced AFNetworking dependency to minimal required dependency. #8

Closed hactar closed 10 years ago

hactar commented 10 years ago

This reduces the dependancy on AFNetworking. Please don't remove AFNetworking completely though, using this reduced version is much smarter than baking your own networking code and allows you to concentrate on framework features. (See #4 and #7).

blandinw commented 10 years ago

Thanks so much for this PR, I actually removed the dependencies to AFNetworking and ReactiveCocoa this morning and was about to push the code.

Apart from development time, do you have any argument against rolling our own NSURLConnection-based code? I hope you can comment on my commit when it's live.

hactar commented 10 years ago

Well, AFNetworking offers other cute features such as activity indicators (http://cocoadocs.org/docsets/AFNetworking/2.0.0/Classes/AFNetworkActivityIndicatorManager.html) and such. Even if you don't use it in your base framework, I can still hook it up from within my app and so get an activity indicator when Wit is using the net connection. NSURLSession is also the new up and coming thing (http://www.objc.io/issue-5/from-nsurlconnection-to-nsurlsession.html) and AFNetworking already embraces that on iOS 7 (though not the parts you are currently using, but that may change in future...)

Let me turn the question around. What is the advantage of not using AFNetworking other than not depending on a framework that a major part of all other frameworks depend on already anyway? I have not written a single app in the last 2 years that does not depend on AFNetworking directly or indirectly. Why reinvent the wheel when CocoaPods takes care of dependencies for users anyway?

blandinw commented 10 years ago

My major concern is that apps using Wit SDK and a different version of AFNetworking may have compatibility issues.

I agree that we should not reinvent the wheel. But as a SDK that aims to be as little intrusive as possible, another dependency is a huge cost.

@KyleLeneau, care to weigh in?

blandinw commented 10 years ago

I'll close this, see #4. @hactar Thanks again