I am, unfortunately, working with some very messy software written by an individual who does not know much programming. It's not object oriented, and the author actually forwards individuals between files in order to execute different scripted functions. Entire pages are wrapped in if/else statements. Each file has its own SQL connection method, each has its own everything, and well - it's the epitome of why we should use OOP.
So my question to you guys is, what's this programming style technically called? I'm writing somewhat of a report on it
It is called spaghetti code
There is such thing as a clear opposite to object oriented programming paradigm, but there other paradigms:
Non-structured programming
This is basically the style people use, when they have just learned programming. Nowdays most commonly found in for of shell scripts, poorly written assembler code and "include-oriented programming" style in PHP. It is also how most the code, that you can find, in BASIC is written.
Procedural programming
Something like next iteration in programming practices, with introduction in routines (functions, procedures). Code is separated in reusable chunks.
This is the most common paradigm for PHP code that you can find in the wild web. It is good for small to medium applications. Also, keep in mind that static methods in classes are also part of procedural paradigm.
These two would be the closest you can get to the "opposites of OOP". But there are a lot more paradigms. The other two you might want to look into would be:
Also, I would highly for you to watch this video: Programming With Anthony - Paradigm Soup [4:35]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With