The Rise Of Pop
Since the the very first days of Object Oriented Programming revolution, programs were built with classes and subclasses. This allowed us to write code that could be reused between objects in a program, and inherit code to objects that could handle special tasks. It also allowed us to obfuscate what methods of a class did to the outside world, but still allow the outside world to get access to the methods.
In essence, Object Oriented Programming is used almost everywhere now. For applications on desktops and web and for mobile devices. Object Oriented Programming is by no means slowing down and I expect it will be around for as long as computer programming is from now on as it is the perfect way to model the world around us.
Object Oriented Programming 2.0
Object Oriented Programming is not being replaced - it's being enhanced.
Object Oriented Programming works for 99% of the time, but every now and then you come across objects that have similar functions and need to be utilised by the same classes. This is where code ends up being replicated - which come the time of change ends up being a real pain.
Protocol Oriented Programming
If we could set up objects to adhere to certain behaviours then we can reduce code replication. By making objects conform to a protocol then we can define functions in an external way. Or we can ensure that the object is able to perform the tasks that is required of it, for it to be useful to us.
For example, a JSONable protocol would require that a model could be created by a json file - and when it comes to handling network requests we can create objects without even knowing what objects we are creating at the time. This becomes super powerful when it comes to code reduction.
Protocol Oriented Programming allows for modularity at greater deal than ever before. So when it comes to testing we can test individual units through by using conformity rather than concrete objects. This makes its' testability super easy because we can check that each unit can handle what ever is thrown at it, providing it conforms to the correct behaviour.
Get your project started
Talk to us today about web and app projects