Test-Driven Development (TDD) in Swift
Khawer Khaliq Blog
by Khawer Khaliq
7M ago
Learn how to use Test-Driven Development (TDD) in Swift which not only enables you to write more reliable and maintainable code but also allows refactoring of code in small increments and with greater ease and confidence. The post Test-Driven Development (TDD) in Swift appeared first on Khawer Khaliq ..read more
Visit website
When and how to use the Equatable and Identifiable protocols in Swift
Khawer Khaliq Blog
by Khawer Khaliq
2y ago
Detailed coverage of the Equatable and Identifiable protocols, and how they can be used to model not only values but also domain entities with identity using Swift value types, to create code that is more efficient, easier to reason about, easily testable and more concurrency-friendly. The post When and how to use the Equatable and Identifiable protocols in Swift appeared first on Khawer Khaliq ..read more
Visit website
The Power of Optional Chaining in Swift
Khawer Khaliq Blog
by Khawer Khaliq
2y ago
Learn how to use optional chaining to work safely with optionals, to set and retrieve the value of a property of the wrapped instance, set and retrieve a value from a subscript on the wrapped instance, and call a method on the wrapped instance, all without having to unwrap the optional. The post The Power of Optional Chaining in Swift appeared first on Khawer Khaliq ..read more
Visit website
Do we need the Command Pattern? Not if we use Swift
Khawer Khaliq Blog
by Khawer Khaliq
3y ago
Explore the the new way of designing applications in Swift, with powerful value types used to model the domain, which enables us to enjoy the benefits of the Command Pattern, and more, without the complexity and boilerplate code, keeping our code simpler and more efficient, testable and concurrency-friendly. The post Do we need the Command Pattern? Not if we use Swift appeared first on Khawer Khaliq ..read more
Visit website
What Are Swift Optionals and How They Are Used
Khawer Khaliq Blog
by Khawer Khaliq
3y ago
This article explains what Swift optionals are, why Swift has them, how they are implemented, and how Swift optionals can be used to better model real-world domains and write safer and more expressive code. The post What Are Swift Optionals and How They Are Used appeared first on Khawer Khaliq ..read more
Visit website
A Protocol-Oriented Approach to Associated Types and Self Requirements in Swift
Khawer Khaliq Blog
by Khawer Khaliq
3y ago
Use protocol-oriented programming to avoid having to use associated types in many situations but also to effectively use associated types and Self requirements, where appropriate, to leverage their benefits while avoiding the pitfalls. The post A Protocol-Oriented Approach to Associated Types and Self Requirements in Swift appeared first on Khawer Khaliq ..read more
Visit website
Retroactive Modeling With Protocols in Swift
Khawer Khaliq Blog
by Khawer Khaliq
4y ago
Harness the power of protocol-oriented programming to free yourself from the need to build inheritance hierarchies and inflexible abstractions. Start with concrete code and retroactively introduce abstractions to enable new use cases for existing concrete types and refactor the concrete types themselves. The post Retroactive Modeling With Protocols in Swift appeared first on Khawer Khaliq ..read more
Visit website

Follow Khawer Khaliq Blog on FeedSpot

Continue with Google
Continue with Apple
OR