Comparison of different products
Comparison of different products
There is no thing best in the world. If something is best, it means, others simply wont exist and if exist, won’t survive.
Same is true for PHP frameworks. Presence of multiple frameworks is proof that no framework is best. So how will we select right framework for our next project?
I am Kapil Sharma, Technical Architect at Eastern Enterprise, with 10.5 years of professional experience in web application development, using different programming languages, CMS & frameworks. This article mainly shows how do I select framework for my next project. Personally I have worked with Zend Framework 1 (not 2), Symfony 1 & 2, Code Ignitor (not working any more), and Laravel 4 & 5. So I might not be the right person to compare all frameworks but it doesn’t stops me selecting right framework for next project, does it?
Please note, this article list down my points for considering framework for next project. There could be many who might not agree with me, and I respect their views.
To keep article short, I am assuming we already selected PHP as programming language and ruled out CMS. So only PHP frameworks are considered in this article.
Following well defined coding guidelines is very important for a team (two or more developers). Proper coding guidelines help team members to understand the code written by other developers and thus improve efficiency of the team.
Although all teams develop their own coding guidelines, there is some basics that will always stick. You can define if you want to use camelCase or snake_case but many times, developers find it difficult to understand the meaning of different cases. So in this article, we are going to define different cases used in programming.
It have all the words in lower case and different words are separated by underscore (_). It is mainly used used and popular in wordpress and old PHP projects. Examples:
Spinal-case or kebab-case or lisp-case
In last 2 months, at least 4-5 computer science students asked me which language should they select/learn for their final year project and career? I was surprised what should I answer. Selection of programming language is generally based on your existing knowledge or project.
Problem here is, two of the most crucial factors of selecting programming language are missing here which make it very difficult question to answer.
Before we answer this question, we must first understand how most programmers select language for any project. There are two major factors:
- Existing knowledge.
- Project requirements.
Existing knowledge is very important. Suppose you know Java and someone give you choice to work on either Java project or PHP project. Your selection is obvious; Java. Why? Is it because Java is better than PHP? No, no language is better than other. You choose Java just because you know Java or in other words, you didn’t chose PHP because don’t know it and you are scared of learning it. Thats human nature. Changes are difficult for humans and we don’t want to go out of our comfort zone. Another reason, which is more valid, programming language is just a tool to fulfil business requirements and if I can do it with existing tool, why should I purchase another tool.
Second reason is project requirements. Now assume you are PHP programmer and you got a project to make a desktop application. Since PHP is not a good tool for desktop applications, your project requirements are forcing you to switch programming language. No matter which language you choose but you definitely will not choose PHP. Please note this is just an example when project force you to switch language but not a practical example as ‘only PHP’ developer will never accept desktop application project. However in real world, you sometimes get project that can be done in your programming language but learning and doing in some other language is more convenient, based on multiple factors like production server availability, existing team knowledge, client preference etc.
Choosing a PHP framework is not an easy task, especially if you have relatively little experience in PHP to know what makes a good framework or and what doesn’t, but choosing the right PHP framework for the job is absolutely critical in the long term as choosing the wrong PHP framework can lead to a number of negatives, such as longer development time, need for more experienced staff who may be hard to find and of course performance problems. Unluckily (or perhaps luckily) when it comes to PHP there is such a plethora of PHP MVC Frameworks that it’s damn hard to actually boil them down to the final choice. With ASP.NET for example it’s quite easy (although it’s gotten a little more complicated lately), previously there was only ASP.NET but now there’s also ASP.NET MVC, which is very different development paradigm and has it’s own catches. However, one thing with .NET is that you need to choose how you’re going to do your data access, etc, but with most PHP Frameworks there is usually only one or two ways and they tend to do the job quite well. So, now with this brief introduction, here’s the thoughts on Yii Framework (1.1.5) vs Zend Framework (1.11.0) vs Code Igniter (1.7.2).
Attitude: I hate Anti-virus.
I started using computers in 1996. At that time, it was just a video game for me. By 1999, I started looking at a bit seriously. My father was system administrator at that time. He was having Norton Antivirus on the system. System was P1 (Don’t laugh; it was latest & best at that time) but very slow. By 2002, I was in Bhilai, doing my engineering and got a personal computer. I become the system administrator for my personal computer. My father got Norton Antivirus installed on it. My system was very slow so I searched internet finding the reasons. Somewhere I read Antivirus is the biggest virus of computers. I started hating antivirus. I uninstalled Norton from my system. My system was not connected to the internet so there was no threat for the system. So everything was fine. Attitude of hating antivirus got powerful in my subconscious mind.