

A short thread for beginners:
OOP is a style of programming that focus on objects rather than functions.
It helps programmer to avoid interdependency between their functions (spaghetti code).
#100DaysOfCode #javascript #webdev #CodeNewbie
There are four pillar concepts which will be described in the following tweets.
- Encapsulation;
- Abstraction;
- Inheritance;
- Polymorphism.
- Encapsulation;
- Abstraction;
- Inheritance;
- Polymorphism.

By grouping related variables (proprieties) and functions (methods) that operates on them as one object you ensure the creation of functions with less parameters.
Therefore, those functions will be easier to maintain and to reuse.

OOP allows you to focus on a simpler object interface by hiding methods and properties from the outside view. This will reduce the visual noise of the code and make it simple to understand.
Changes made to the object will not impact the rest of the application.

By creating objects that contain properties and methods shared by other objects, you are able to eliminate redundant code.
Remember that objects will inherit the properties and methods from a parent object.

This concept provides a way to perform a single action in different forms. It provides an ability to call the same method on different objects and rely on inheritance.
It allows your to get rid of long if/else or switch case by implementing the render method
In summary, OOP allows you to :
-Decrease complexity of your code;
-Increase reusability;
-Reduce the impact of changes to your code;
-Eliminate redundant code;
-Refactor complex if/else or switch/case statement.
-Decrease complexity of your code;
-Increase reusability;
-Reduce the impact of changes to your code;
-Eliminate redundant code;
-Refactor complex if/else or switch/case statement.
Thanks for reading!
If you wish to learn more on OOP I recommend on YouTube @MattCodeJourney and @moshhamedani.
Have a great day and stay safe!!
If you wish to learn more on OOP I recommend on YouTube @MattCodeJourney and @moshhamedani.
Have a great day and stay safe!!

