
In an attempt to make every piece of code reusable and nicely encapsulated in a function / class, you might in fact slow down the execution of a script. Each method and object call consumes memory - a lot. Basically think of what code you will actually reuse later in your application / in other application, and which not.
Also, do not implement every data structure as a class. Arrays are useful, too, for this job.
The idea to remember is that, strictly speaking, the execution of OOP code is slower than procedural code, so you’d better be careful when implementing everything as OOP. What has to be OOP, let it be OOP - the rest, make it the easy way :)
If you would like to make a comment, please fill out the form below.
Recent Comments