Object oriented programming (OOP) has been out for a very long time. Learning the basics and logics of programming is not enough for any developer. While you build functions, and procedures with the programming language of your choice, doesn’t it feel redundant to code the same thing over and over for different projects that are using the same structure, or similar in design?

Suppose you create a website for oe client, and another website for another client. Both of them wants to integrate a Twitter feed into their website. While creating the functions for one website, you are most likely to copy and paste the function to the new website, and change some stuff around like their user ID, or their Twitter’s screen name. You would have to open the old website script files, and copy and paste the lines of codes to the new website script files.

With object-oriented programming, the process is worked around objects. Instead of copying and pasting lines of codes from the old website to the new website, you would have to instead copy a file which is purely written for that Twitter feed and nothing else. This may not sound any simpler from the example given above, but perhaps you have a more complex application to develop like something along the lines of a CMS system. One client wants to be able to manage pages, categories, and news entries while another may just want pages, and categories. With OOP, each of these can be considered as an object, rather than an action, which allows you to plug and play any of these options you want.

Related posts: