James John – Software Engineer

5 Reasons Why I DON’T Use Frameworks in PHP

Weird right? But yes I don’t use frameworks and I am not thinking of using any in future. Ever since I started PHP and understood what is frameworks and what it does, I promised myself not to use and am still living with the legacy, friends told me if you don’t use it you can’t code well, but I kept to my legacy and I don’t think you can code faster than me by the grace of God. I also found out that my guru don’t even use it which made me stand more strong in my words πŸ™‚

 

php_frameworks

What could be the reason why I don’t use it?

  1. Coding Skills: I was opportuneΒ to be in a Hackathon competition few weeks ago and I had my partner because the rule was “You must be a team of 2 people at least”, he was quite a framework freak and his codes were quite okay. The framework boosted his work and saved his time and energy, but come to think of it when you are told “No Frameworks!!!” do you think you can code faster than a normal coder? Of course NO, once you try coding normally, you see yourself deviating back to a framework coding style which will slow you more down because you don’t even have the sample code of the frameworks. But being a normal PHP coder, you can code as fast as you can creating functions, variables, classes and expressions by yourself and it goes into that head!
  2. Defense: Aha! Here now, another friend wanted me to present his written PHP project and he coded them with CodeIgniter. He has to start afresh showing me how the coding goes; autoloaders, db, config and many of them which I even start feeling dizzy in that πŸ˜€ but afterwards I succeeded in knowing most of them but still I don’t use them! Now on the D-Day we have to shift the project to another server because the other had issue, after shifting successfully and loaded our index.php page…boom! (‘404 File Not Found’), I was like “What the hell?” we went ahead looking for a solution of a problem we were not even sure about πŸ˜€ . That took us more than 2HRS with internet access we couldn’t troubleshoot the cause of our problem (I later left them for another vital section, so am not sure if the error wasn’t rectified πŸ™‚ ), why would it be so hard for us to find a solution to our problem? Because we didn’t write the codes ourselves, it’s an already written functions, variable and classes we are just calling up and using them. Many of framework users don’t even know where the db insertion takes place πŸ˜€ and unfortunately you find your self in public where someone asks you “sir, please show us the line which your db insertion takes place” and too bad for you that you don’t know, that means that you can’t defend your project!
  3. Career: You are developer looking for a job and you are trained up in PHP with a framework, a project comes and your employee says “we need this project done with no frameworks, normal PHP and ASAP” obviously you know you are loosing the job. But a trained up PHP developer with no frameworks gets the job in ease even if your employee says he needs frameworks, with the existing knowledge of PHP he has he can easily learn frameworks within 24hrs (if it’s me) and integrate it to the project.
  4. Server Configuration: PHP configuration varies in some servers, your local server maybe the PHP 5.5 and your online server maybe PHP 5.4 or lower, new functions are created some existing ones get depreciated like the ereg_replace(). You will notice that you’ll be having bugs in your project, that is when some people say “It works fine in localhost but messes up in online host” because configurations are not the same. Now how does this implies to using frameworks, your existing project which is already running one has a framework of a certain version and unfortunately a PHP version is released and some function got depreciated next thing is:

    Deprecated: Function function_name() is deprecated

    or

    Fatal error: Call to an undefined function function_name()

    I bet you don’t even know what the codes are saying in core files of frameworks if you go ahead in debugging it πŸ˜› but if it’s your own coding of course you can debug it and replace the function with the current one where ever it is πŸ™‚

  5. Finally, I hate frameworks because I wanna do it myself and get it into my head!

Above is the little I got, I can’t really convince you to stop using frameworks because it’s a thing of taste. Everyone knows what he/she likes and dislikes. Good luck πŸ™‚

James John

Software Engineer