The truth about Object-oriented Programming
Explore the core principles of object-oriented programming and its role in reducing code duplication and enhancing software maintainability. Understand differing perspectives on OOP, its practical challenges, and how Ruby simplifies classic OOP concepts to help you write clear, effective code for real-world applications.
We'll cover the following...
Code duplication vs. Object-oriented Programming
Object-oriented programming was introduced as a tool to use with growing code complexity. One of the main goals of OOP is to avoid code duplication, simplify a system, make it more maintainable, and cut down development costs.
However, there are other opinions as well. As we’ve mentioned before, some programmers think that code duplication is preferable to erroneous abstraction. It sounds reasonable because OOP is not only encapsulation, polymorphism, and inheritance. It’s also patterns and practices that have their pros and cons.
One might need not only theoretical knowledge but also significant development ...