Gio Lodi 8/18/2015

Explicit Dependencies, Swift Edition

Read Original

This article discusses the concept of explicit dependencies in Swift, where a class's dependencies are passed as initialization parameters. It explains how this improves code readability and testability, provides a Swift code example for a ProductService class, and compares the approach to Objective-C. The author also invites discussion on using convenience initializers versus factory methods.

Explicit Dependencies, Swift Edition

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser