Friday, August 1, 2014

Alamofire

Mattt Thompson:

Alamofire is an HTTP networking library written in Swift. Think of it as AFNetworking, reimagined for the conventions of this new language.

Of course, AFNetworking remains the premiere networking library available for Mac OS X and iOS, and can easily be used in Swift, just like any other Objective-C code. AFNetworking is stable and reliable, and isn’t going anywhere. But for anyone looking for something a little more idiomatic to Swift, Alamofire may be right up your alley. (It’s not a mutually-exclusive choice, either! AFNetworking & Alamofire will peacefully co-exist within the same codebase.)

1 Comment RSS · Twitter

After looking at the code, I'm still thinking that Swift code is illegible:
- You can't figure out quickly how the code is supposed to be used because of the lack of a header or some kind of interface declaration.
- As soon as you've reached the ParameterEncoding enum, you're looking for a tree.
- As soon as you've reached the .URL case, you're looking for a rope.
- As soon as you've reached the "lazy var defaultHeaders: [String: String] = {" line, you have jumped.

Leave a Comment