How to choose framework for PHP

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

i4ba1
Forum Newbie
Posts: 2
Joined: Tue Dec 28, 2010 4:34 am

How to choose framework for PHP

Post by i4ba1 »

Hai all

I wan to ask all of you about what the php framework that i should used?. As we know there is a lot of framework in php. But, i think therese is the best and most popular framework that most web developer used.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: How to choose framework for PHP

Post by alex.barylski »

"best" is subjective. I would say mine is the best, because I prefer light-weight, controller-centric, micro-frameworks. It doesn't enforce MVC but gives as much as it can to facilitate proper and effective seperation of concerns.

Zend is probably the best choice for an Enterprise, because of it's marketability. You could learn framework XYZ or ABC but Zend will probably look more impressive on a resume to someone unfamiliar with the dozens of available of frameworks.

If you are trying to learn about frameworks, then Zend is not the best choice. If you are not interested in learning about frameworks and care only about RAD and getting development up fast, CodeIgnitor is well documented and pretty easy to learn.

This is a decision only you can make based on your personal experience levels, requirements, how pedantic you are about best practices, etc.

Cheers,
Alex
jankidudel
Forum Commoner
Posts: 91
Joined: Sat Oct 16, 2010 4:30 pm
Location: Lithuania, Vilnius

Re: How to choose framework for PHP

Post by jankidudel »

Hi, I can suggest for you 2 types of most popular frameworks

1. cake php or codeigniter = yeasy to learn , bla bla bal, for not such big projects

2. symfony or Yii = harder to learn, very powerful, for medium to huge projects
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: How to choose framework for PHP

Post by josh »

I would recommend Zend, not to impress people but I feel it provides a wider arsenal of tools that are better documented than the other framework's comparable solutions.
jankidudel
Forum Commoner
Posts: 91
Joined: Sat Oct 16, 2010 4:30 pm
Location: Lithuania, Vilnius

Re: How to choose framework for PHP

Post by jankidudel »

I won't recommend Zend framework for the first try, because whererever I read in forums about distinct frameworks, Zend isn't on the top ot them.

Frameworks on the top recommended by lots of forummers:

1 Yii
2.Symfony
3.codeigniter
4.cake php

, where Yii and Symfony are heavyweight frameworks, unlike codeigniter and cake php.
I'ts like tomparing sf and Yii to drupal, and ci and cake to joomla :D
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: How to choose framework for PHP

Post by alex.barylski »

Zend is as good of choice as any. You must serioualy ask yourself a few questions to determine which is best:

What is your level of experience (Beginner, Intermediate, Expert)

If your a beginner, than a framework like Drupal, Joomla or similar CMF would probably let you get up and running the fastest. Implementing custom modules can be a challenge, Drupal has more, albeit poor, documentation. Joomla is far more MVC focused, so that makes development a littler easier.

CodeIgnitor, CakePHP are good, very well documented (in a way your avergae lay person developer can understand). Zend has lots of documentation but their focus is more on a good design savvy crowd.

Zend started off beautifully but quickly exploded in complexity and grew out of scope for what I think a low-level framework should encompass. I prefer micro-frameworks, which is not. I prefer downloading the required libraries anyway, such as SwiftMailer, PDF, etc.

Cheers,
Alex
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to choose framework for PHP

Post by Christopher »

Lithium is a cool PHP5.3 framework. I have used it successfully for a few sites.
(#10850)
jankidudel
Forum Commoner
Posts: 91
Joined: Sat Oct 16, 2010 4:30 pm
Location: Lithuania, Vilnius

Re: How to choose framework for PHP

Post by jankidudel »

Lithium maybe is good, i don't know, but what I know , there is lot of servers still working on php 5.2( so does my), that's a problem :(
i4ba1
Forum Newbie
Posts: 2
Joined: Tue Dec 28, 2010 4:34 am

Re: How to choose framework for PHP

Post by i4ba1 »

So, if i'm a beginner in php framework, what framework that should i choose?. Can you guys, tell me what the php framework for the small, middle and large project??.


Best Regards.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to choose framework for PHP

Post by Christopher »

If you want to start with 5.3 and very modern PHP practices then Lithium. Otherwise I might start with CodeIgnitor as it is the simplest of those mentioned.
(#10850)
jankidudel
Forum Commoner
Posts: 91
Joined: Sat Oct 16, 2010 4:30 pm
Location: Lithuania, Vilnius

Re: How to choose framework for PHP

Post by jankidudel »

Christopher wrote:If you want to start with 5.3 and very modern PHP practices then Lithium. .
But HOW do you apply these modern practices, when providers aren't interested in upgrading php version , hm ? Just only option is to work on local servers :D :lol:
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: How to choose framework for PHP

Post by josh »

http://rad-dev.org/li3_ponies I guess I'm not following best practices, my apps have no ponies :lol: :crazy:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to choose framework for PHP

Post by Benjamin »

Just looked at some of the Lithium source code. I must say it's quite.... yummy. In a not nsfw kind of way. Much better than the bloated Zend garbage everyone seems to love.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to choose framework for PHP

Post by Christopher »

jankidudel wrote:But HOW do you apply these modern practices, when providers aren't interested in upgrading php version , hm ? Just only option is to work on local servers :D :lol:
Either find a 'provider' who uses the latest version of PHP or get a VPS or dedicated server and install it yourself.

But that is irrelevant -- PHP version is a decision point. Either the OP has access to the latest PHP or not. If not I recommended CodeIgniter as a good choice because it is simpler than many other frameworks mentioned.

PS - Lithium is what the Cake guys created after their Ruby on Rails hangover wore off. ;)
(#10850)
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: How to choose framework for PHP

Post by Darhazer »

I would recommend learning at least 2 different frameworks, as this will provide you with much more knowledge about different options you have when you are building something.
Start with small framework like codeigniter, kohana or cakephp
Then build something with Symphony or Zend
Then you can choose on your own, and play with any framework you think is cool
Post Reply