Intro to Object Oriented Programming

Posted by Tyler Jones on April 25, 2021

While there a other types of programming paradigms, Object Oriented Programming (OOP) is the most popular. Each paradigm has its own advantages and disadvantages depending on the application and many languages support multiple types. This blog will focus on an overview of the OOP paradigm and may include a part two in the future.

​ There are many advantages to using or learning OOP other than it being the most used. Understanding the concepts of OOP can help you across many popular languages (e.g., Java, Python, Ruby, JavaScript). A major advantage to OOP is code reusability. The ability to define objects, methods, functions, etc., and use them anywhere in the project. OOP promotes abstraction and increased flexibility allow code to be dynamic, accessible, and manipulatable.

​ In OOP objects are identifiable and contain attributes or properties that describe it. Every object is self contained with it’s own data and responsible for itself. No two objects are the same and objects can contain other objects with their own attributes and data. Classes are what defines the object and describes what it is and does. Each class has a name to identify it, attributes to contain data, and behaviors to take actions or manipulate data.

​ New objects can be created as instances of the class in a process called instantiation. Each instance is self containing and manages its own data meaning two instances can have completely different data but maintain the same structure from the class.

​ Fundamentals of the OOP paradigm are based on quality and productivity. Classes are abstract in the idea or concept is separate from a particular instance. They enable a new object or class to be based on (inheritance) an existing one, e.g., Class German Shepard could inherit attributes and methods from Class Dog. Class Dog, in this case would have a higher level of abstraction. Classes and objects should be encapsulated and be responsible for the protection and data management of itself. If other classes could freely change and miniplate data it can affect all other instances.

​ This blog covers an intro to the basics of Object Oriented Programming at a high level. For more details and in depth knowledge I will leave a few links below so feel free to check them out.

References:

Tech Target - OOP

Free Code Camp - programming paradims

educative - OOP

Edit: Part two is up!