I have had numerous conversations about what exactly is Protocol Oriented Programming since my Protocol Oriented Programming with Swift book was released. Everyone I spoke to seemed to have his or her own opinion about what POP is. Out of all of those conversations I think this is the best explanation that I heard “Programming with an orientation toward the use of protocols for abstraction”.
Have you wanted to use the Swift programming language to write applications on your BeagleBone Black? How about programming robotics with Swift? This blog post will show how I setup my BeagleBone Black to use Swift and also shows how we can use the SwiftyGPIO package to interact with the digital GPIO ports on the BeagleBone Black.
Generic programming can be defined as "programming with concepts”. In this post we will look at the idea of Concepts in the Generic Programming paradigm and how this relates to Protocol Oriented Programming in Swift.
Pretend for a while that class, struct, enum, and friends don’t exist in Swift... What type of more fundamental structure is capable of expressing object-oriented programming? Join me as we use closures and functions to create our own object-oriented programming system!
In this post I would like to look at the The Law of Useful Return. The Law of Useful Return says: If you have already done the work to get some useful result, don’t throw it away. Return it to the caller because they may be able to use it.
I had some issue with keychain. Though, I download all the certificates and provisioning profiles properly. I was not able to take the build in Xcode 7.2. Does this certification is the reason for that?
In this post we will look at the iterative approach to programming where we should be constantly looking to improve our code. Keep in mind that no one writes good code the first time' it takes many iterations to find the most efficient or general way to do something. No programmer should have a single pass mindset.
An NSURL is how you describe the location of a file or directory in your Swift App. You can also easily add or delete path components with a few methods.
POP vs OOP
Numerous tutorials that I have seen take a very Object-Oriented approach to the protocol-oriented programming (POP) paradigm. By this statement I mean that they tell us that with POP we should begin our design with the protocol rather than with the superclass as we did with OOP however the protocol design tends to mirror the superclass design of OOP. They also tell us that we should use extensions to add common functionality to types that conform to a protocol as we did with superclasses in OOP. While protocols and protocol extensions are arguably two of the most important concepts of POP these tutorials seem to be missing some other very important concepts.
In this post I would like to compare Protocol-Oriented design to Object-Oriented design to highlight some of the conceptual differences.
From the department of Domain-Driven Design code patterns, I today present to you: well-named value objects! You can go a lot farther than you have previously ...
How do you test NSURLSession properly? After all, using it in tests directly will hit the servers; that's not what you want to do 1000s of times per day. ...