-
Book Overview & Buying
-
Table Of Contents
Clean Code with TypeScript
By :
In this section, we'll understand what OOP is and build a foundation for how it can be applied.
A common definition of OOP is that it is a programming paradigm. A programming paradigm is a set of principles that define how programs are written, structured, and executed. You can think of it as an overall approach or philosophy for organizing code.
From a widely accepted classification standpoint, most programming paradigms fall into two broad categories: imperative and declarative.
In imperative programming, you describe how a program should perform its tasks, step by step, by explicitly changing the program's state over time. Both procedural programming and object-oriented programming belong to this category. Procedural programming organizes code into functions or routines, while OOP organizes code into objects that combine data and behavior.
In declarative programming, you describe what the program should accomplish rather than how to do...