1,038 karma · joined July 29, 2009
Induction is my first real project with ARC, so I'm figuring this out as I go along.
Binaries are up at https://github.com/Induction/Induction/downloads
Let me know what build errors you're getting. I would do well to document the requirements (Postgres, Redis)...
I understand and respect your skepticism, since by using NSURLConnection, its performance is bound by the same thing most other libraries are (although ASI was wrapped the lower-level CFNetwork APIs, FWIW). It's the stuff around the network activity--the way the application interacts with the data that makes AF fast. I've gone out of my way to design a minimal API that is performant no matter how you (mis)use it.
But you're right: I'll have to get around to writing a benchmark app at some point :)
- As I understand threading and run loop scheduling, the run loop will spin up as needed when an NSURLConnection attaches itself to it, and back down again when no more connections are active. The dedicated network thread is there only to manage that run loop.
- Regarding processing queues, like the JSON one, I thought it would be a good idea to isolate that from the global queue; it could always target another queue if needed. Also, unless I'm mistaken, those queues should be concurrent rather than serial.
- As for dispatching to the main thread, this only happens it after all of the work in the operation is done. This just seems like good default behavior. If you wanted to, you could very easily override this by manually setting the `completionBlock` yourself.
There are no hard performance benchmarks, but you'll get a good sense of how fast it is if you download and run the example app--I've yet to see any apps match the table view image loading performance.
FWIW, people who have switched from ASI usually report an overall networking speedup of 2-3x.
I'm always glad to hear about more creative solutions to solving this dilemma. In my experience, since switching to Sass, I can't really think of a case where I had to sacrifice semantics for style, but perhaps that's an effect of being a designer who's wary of such things (letting the man who shovels sh*t decide how many elephants there should be in a parade, et wot).
Anyway, I don't think I share any normative urgency, (especially with something like W3C specifications). At the end of the day, I'm overjoyed that Sass saves me from 99% of semantics issues. For that other 1%, there's always the style attribute, no? ;)
I disagree.
As I understand it, in this argument, "usefulness" is defined as "is styled correctly with CSS". To this end, the author cites using `"class"="span6"` on elements, which are presentational, but not semantic.
This argument may have held more clout a few years ago, but tools like Sass have pretty much solved this problem of separation of content and presentation. Using a framework like Compass allows `"span6"`, for instance, to be expressed as a function on a semantic element, leaving your markup intact.
CSS frameworks, like Twitter Bootstrap, still stuffer from this conflation, but that's just a limitation of the tools. I make no claims to a prescriptive argument on the matter--go ahead and do whatever works--but I would be interested what the author would think about Sass, or Less.
And though I don't have the exact numbers, AFNetworking is really fast, maybe 2-3x over ASI in average cases, from my experience and what other users report.
Take a look at the examples in the README and compare that to how you'd do the same in ASI.
The rest of this I could really take or leave. Really wish there was something better than EGOPullToRefresh in wide use...
ASI is a respectable library, certainly. It's been around for a long time, and it does everything you could possibly conceive of. Problem is, for most people, it does too much, and as a result, doesn't do anything particularly well.
AFNetworking does 2 things really well: API requests and image loading. 80% of the time, this is all that's necessary. For when it isn't, AFNetworking is small, understandable, and encapsulates most information in familiar Foundation classes (eg. NSURLRequest), which makes it much easier to extend than ASI.
It's a ways off from having the maturity of ASI, but I see a lot of promise in AFNetworking's design, and I'll do what it takes to keep improving it. Keep a look out for a blog post and better documentation in the coming weeks.