Digging a bit down to the history of Object Oriented languages, I found a phrase that summed it up: 'It's all about the network!'. As Internet grew, OOP grew alongside. While going through the history of rise of OOP, I came across something that I think is useful to share it here. Java was the earliest of the languages based on Object Orientation, and the fact that it led to be so successful was that it could change how a HTML webpage worked drastically. With the oncoming of Java applets, we could now move from a static (and a boring) webpage to a dynamic webpage with tons of added functionality.
Now, the big question still remains open, 'What is Object Oriented Programming?'. Before OOP, the codes were basically a long chunk of a single-piece code. You could add functions but the whole logic and data was bundled as one which was less modular and flexible to work with. In an object oriented program, you can have multiple self-contained objects which could each work as mini-programs coupled with each other to serve at the bigger picture. Each object can have its own data and logic, which may sound confusing at first. But, actually this let's you to simply work over objects as you do in the real life. (It's a Lamborghini, and it's a BMW. Both are cars, yet different objects)
OO is an idea that used the concept of Classes and Objects, just as we use them in day-to-day lives. Classes give you the blueprint or description of anything that actually does not exist. They define attributes and behavior. For a class mobile, its attributes maybe its size, OS, brand and many more whereas its behaviors could be it's functioning to provide a call, capturing images via a camera etc. Commonly, attributes are referred as properties and behavior as methods. Objects bring out the abstract idea into existence. You can create multiple objects from one blueprint (class), and map or connect different objects to fulfill your needs.
OOP lays a better architectural platform to work over which reduces our chances to mess up where to put the required data and logic associated with it. Moreover, it gives you chance to bypass many things not being used, and makes it easier for the developer to go through correcting his more so-called 'disciplined' code.
No comments:
Post a Comment