Which Framework is "the Best"?
Join the DZone community and get the full member experience.Join For Free
when i started learning programming for internet in 2001, i started with perl. it was a fantastic language and everything was fine. there was absolutely no problem with it. but then, when i tried to host my tiny application in free hosts available that time, i understood that finding a free host for perl was not as easy as finding one for php. though some hosts were offering free perl hosting that time, but there were problems with available modules etc. and i was a noob with very limited resources around me (even i couldn’t access internet all the time, it was costly like hell for me in those days). i started learning php. it’s syntax was similar to perl and there was even the friendly “$” sign present, it didn’t take me too much of time to change my application into php. i choose one from the many free php hosting providers and my application went live immediately.
is perl a bad language? was it a bad language? no!
but in the end of the day, php turns into the best thing for me because there were plenty of resources available, there was a “hell of a manual” with user comments and what not.
these days, beginners and fresher asks a common question all the time – “which framework is best?” . my answer remains simple for them, “none”. if you are planning to learn a new php framework or want to choose a php framework for your web application, there are some small points you need to consider first.
1. what is my applications going to do?
2. which framework has a stable community
3. which framework has good resources available
4. which framework is under solid development phase and not in a “discontinued” mode?
once you have the answer, you need to know that there are basically three types of frameworks in nature. though most of them offers you an mvc or hmvc work flow, yet, they differ in nature.
- some frameworks are too liberal
- some frameworks are too strict
some of them are over strict and configuration junky
i started with codeigniter. it was extremely liberal, allowed me to write very bad code. in those early days, when i was not pretty much aware of the “mvc” convention, i wrote business logic in the controller, even sometime called model from inside a view. i was like “why not? it works” – but i never understood the philosophy of the true mvc application model and continued to write bad code, until i realized the beauty of coding and the value of that in a team work.
i started learning cakephp, but well, that time its strict coding style and it’s “convention over configuration” started looking awkward to me. because i had jumped into cakephp from a comparatively liberal world of programming, codeigniter. i learned cakephp for a couple of months, even used it in a few applications i was working on that time and i gave it up. it was painful for me.
but then, i realized that to write code that you can really take pride on, you must follow the convention. you can’t simply write business logic inside a controller just because you can do it. you should give up your stubbornness. i started again with zend framework. we, a small team in leevio spent a couple of weeks learning zend framework together. though it was a bit painful that time with rob allen’s tutorial and very very bad official manual where anyone gets lost in a pile of unnecessary talks, ultimately it started paying off. we learned the zf and helped other people in our team to learn it in a collaborative effort. zend framework is a real gem. it’s strict, but it allows you to write bad code too. however, the strictness is not something that can hurt like a framework which i frequently call a configuration junky, like symfony.
i had a hell of an experience with symfony, oh boy! i wanted to give it a try in 2007/08 and then after spending two days with their configuration system, sandbox, blah blah, this and that, i had been finally able to say hello to this world. i was exhausted, my eyes were almost tearing and it didn’t take much time to change my “hello world” into “bye bye symfony”
long story short, if you are a beginner with mvc and want to learn a framework from the heart, start with zend framework or cakephp. soon you will realize that you may not have to move or use any other framework unless the situation requires it. saying that, there are other very good frameworks out there like yii, codeigniter and kohana (started as a fork of codeigniter and later it became what it is now)
and again i am answering the title question “which frameworks is
best” – there is no such “best” thing to be honest. the one that suits
your need is the best framework for you.
Opinions expressed by DZone contributors are their own.