Backend Development

OOP Vs Procedural

Submitted by bauss, , Thread ID: 18147

Thread Closed

RE: OOP Vs Procedural

#11
OOP!1Because it will be all things abstract, there is attribute logic more

RE: OOP Vs Procedural

#12
oop for speedy development, better code management and code re-usability; proc. for faster loading times and using less server resources

RE: OOP Vs Procedural

#13
Definitely OOP but I don't use it for my PHP yet, although, I did upgrade to PHP7 on my dedi so I will start teaching myself better coding practices with PHP when I have to start making custom plugins again.

RE: OOP Vs Procedural

#14
12-09-2017, 12:56 AM
Mr.Chip53 Wrote:
Definitely OOP but I don't use it for my PHP yet, although, I did upgrade to PHP7 on my dedi so I will start teaching myself better coding practices with PHP when I have to start making custom plugins again.

Wow, seems cool. Can you make a loading screen based on that?

RE: OOP Vs Procedural

#15
All of them are good in their own ways - They're simply different approaches to the same problems.

In a purely procedural style, data tends to be highly decoupled from the functions that operate on it.

In an object oriented style, data tends to carry with it a collection of functions.

In a functional style, data and functions tend toward having more in common with each other (as in Lisp and Scheme) while offering more flexibility in terms of how functions are actually used. Algorithms tend also to be defined in terms of recursion and composition rather than loops and iteration.

Of course, the language itself only influences which style is preferred. Even in a pure-functional language like Haskell, you can write in a procedural style (though that is highly discouraged), and even in a procedural language like C, you can program in an object-oriented style (such as in the GTK+ and EFL APIs).

To be clear, the "advantage" of each paradigm is simply in the modeling of your algorithms and data structures. If, for example, your algorithm involves lists and trees, a functional algorithm may be the most sensible. Or, if, for example, your data is highly structured, it may make more sense to compose it as objects if that is the native paradigm of your language - or, it could just as easily be written as a functional abstraction of monads, which is the native paradigm of languages like Haskell or ML.

The choice of which you use is simply what makes more sense for your project and the abstractions your language supports.

RE: OOP Vs Procedural

#16
OOP helps you be so much more organized and performs easy execution of functions.

Users browsing this thread: 2 Guest(s)