associatedtype on Protocol, making Protocol Generic

associatedtype Protocol Generic

When we talk about generic code we have to come to an associatedtype for protocol. The protocol is the contract between two entities. And to make that contract more generic Swift provides the associatedtype for generic type on the protocol. To develop the proper Protocol Oriented Programming, POP, skill the associatedtype plays an important role. … Continue the deep dive into the associatedtype on Protocol, making Protocol Generic

Swift Generic & Protocol

Feature Image of Swift Generic & Protocol

In the Swift world, Generic is a very powerful tool the same way protocol is. In fact, the protocol is the core concept of Swift. The power of swift comes from its extensibility which is facilitated by protocol. When we are able to use these core concepts, protocol, with Generic our code becomes very agile. … Continue the deep dive into the Swift Generic & Protocol

Swift Protocol Hub

Swift Protocol Hub

According to Apple, declared on WWDC 2015, Swift is the first Protocol Oriented Programming (POP) language. As it seems Protocol is one of the core foundations for Swift learning. To have a better understanding of Swift one has to have a better understanding of Protocol. The Swift book from Apple covers all the basic parts … Continue the deep dive into the Swift Protocol Hub

Dependency Injection in Swift

Dependency Injection

Dependency Injection may seems like a fancy term. But the term is very accurate to describe its functionality. The reason we hold DI (Dependency Injection) as a fancy term is because we mix it up with the DIP (Dependency Inversion Principle). These two DI and DIP seems like almost same. But on reality they are … Continue the deep dive into the Dependency Injection in Swift

Swift Dependency Inversion through Protocol

Dependency Inversion Principle

Here we are, finally we have the Dependency Inversion on Swift through Protocol talk. On our last blog post of Introduction of Dependency Inversion on Swift we were introduced with the two type of dependencies, run time dependency and source code or compile time dependency. On this blog post we will talk about how to … Continue the deep dive into the Swift Dependency Inversion through Protocol

Introduction of Dependency Inversion on Swift

Introduction of Dependency Inversion on Swift

Hmm interesting topic. The D of SOLID. No doubt SOLID has been a major development principle among the developer. And why not? It actually helps us greatly to make our code more agile. Which ultimately leads to more flexible code thus adapting beautifully with the latest requirement changes. On some future post series we will … Continue the deep dive into the Introduction of Dependency Inversion on Swift

Protocol, Swift way of thinking

Protocol Swift way of thinking

You ask any Swift lover, which features you love most on Swift. No doubt; it will be the way protocol works on Swift. Similar concepts like Interface lives on other languages, but the extensibility of protocol makes it shiny. By having protocol on its core Swift is build upon. So to understanding the Swift way … Continue the deep dive into the Protocol, Swift way of thinking

Composition, breaker of chains

Swift protocol composition

As we have learned on our last blog post that, Inheritance is the starting point of code coupling. We also had a hint about breaking that code coupling through composition. Here on this blog post we will initiate the talk about composition on Swift. We will talk about how we can achieve composition on Swift … Continue the deep dive into the Composition, breaker of chains