Jorge Castro - 2014-02-05 21:33:16
PHP is similar to some other languages, in special Java and C#. PHP supports, with some extends, classes, block of code, functions and so on. However, that's the only similarities.
PHP developers works different than Java or C#. Both, in Java and C# exists the concept of "application" or "project", where adding a class or library to the project is more than enough to be uses across all the application. In PHP is different, every file/library should be added manually AND PER CLIENT CALL.
PHP punish us with the use of libraries, the more (and biggest the library) then, the slower the system. In those cases, a big framework DOES NOT HELP AT ALL.
What's a smart php developer does?. Simply add every include only when it is needing, for example the PHPEXCEL library, it should be called only where it is needing.
In my current project, i use the next includes:
-a config file.
-a database library (single file without dependency).
-a html library (single file without dependency).
-a util library (single file without dependency).
-a DAO/DAL (per entity)
and nothing more.