# A Modern Network Operation

DevFeed: [A Modern Network Operation](<https://devfeed.tech/articles/a-modern-network-operation-37510.md>)

Original publisher: [Read original article](<https://www.cimgf.com/2016/01/28/a-modern-network-operation/>)

Author: Marcus Zarra

Published: 2016-01-28T20:12:28Z

Content type: article

Language: en

Sources: [Cocoa Is My Girlfriend](<https://devfeed.tech/sources/cocoa-is-my-girlfriend.md>)

Topics: [Network](<https://devfeed.tech/topics/network.md>), [API](<https://devfeed.tech/topics/api.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Objective-C](<https://devfeed.tech/topics/objective-c.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apple](<https://devfeed.tech/tags/apple.md>), [developers](<https://devfeed.tech/tags/developers.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [network](<https://devfeed.tech/tags/network.md>), [nsoperation](<https://devfeed.tech/tags/nsoperation.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [structure](<https://devfeed.tech/tags/structure.md>), [subclass](<https://devfeed.tech/tags/subclass.md>), [swift](<https://devfeed.tech/tags/swift.md>)

## AI overview

This article discusses designing network operations around Apple's NSURLSession API. It argues that block-based network calls can encourage poor structure and describes a design using subclasses, lifecycle control, implementation changes, and supporting properties for network data and tasks, with Swift-specific differences from Objective-C.

## Source excerpt

When Apple introduced the NSURLSession API, the landscape of network operations changed. In some ways, the new API made things worse as the block API that was added tempts developers to become very sloppy with network calls. The block API makes it trivial to add network calls anywhere in an application. Very little thought or [...]