tags:

views:

271

answers:

10

Hi All,

I am fairly new to PHP but not programming in general. I was hoping I could get some suggestions on the best type of PHP framework to start with considering my basic experience with PHP. I have a .NET and ASP.NET background and I am familiar with the MVC design pattern. I would prefer to start with a framework that makes logical design easier but does not generate all the code for you. I have read some like the Zend framework for this. Opinions?

+1  A: 

I like CakePHP. It uses MVC pretty well and has an active community.

I've also heard good things about CodeIgniter.

David
+9  A: 

CodeIgniter is my PHP framework of choice. Documentation is top notch and well written. The user forums are also a great place to ask questions / bounce ideas off of knowledgeable people.

You can also look at CakePHP as an alternate, but I prefer CI for most things. Simple enough to learn, and easy to build large scalable applications.

There is a pretty decent Cake - CI - Zend comparison question as well.

Josh K
+2  A: 

It depends what you are trying to achieve. There's a couple of really good frameworks out there; personally I've played with CakePHP and Symfony. If you are looking for code generation (scaffolding?) you might want to look at Symfony. The last time I'd had a look at it, it supported generating complete CRUD views.

ilikeorangutans
+5  A: 

I recommend Kohanaphp it is a strict PHP 5 OOP.

Adnan
i agree, tried cake php, powerful but felt fat (pun intended). combined with its powerful ORM and routing features its a very nice package, worth noting that its based on CI's coding structure, only thing that lets it down is the lack of documentation, however i managed to figure most things out so im sure you'll be able to. Also, just remember there are two versions Kohana 3.0, and Kohana 2.34, consider these as two different frameworks, the latter being better documented
Rob
+5  A: 

The world of PHP frameworks is in a somewhat weird state right now with the introduction of PHP 5.3. The new features in PHP 5.3 seem to speak mostly to framework development (namespaces, late static binding, anonymous functions, __invoke() magic method).

It seems like all of the major frameworks are working on something based on PHP 5.3, but there isn't a whole lot out there yet. When these new versions (or entirely new frameworks) come out, though, they'll have some pretty radical differences.

No matter what framework you pursue for your immediate development needs, I'd pay careful attention to the development of the new stuff that's on the horizon. One framework I've been giving close attention to is the Lithium framework, written by some very talented developers, a few of which from the CakePHP project. It showcases a lot of what's possible in PHP 5.3.

http://lithify.me/

Another project to check out is the new version of Symfony (still a preview release):

http://symfony-reloaded.org/

For someone new to PHP, I'd hate for you to just barely get comfortable with the older code out there and have all of this new stuff hit you and throw you off. So, even if you don't find a 5.3-based framework that fits your needs, keeping up with the newer stuff will be worth your while.

awgy
+3  A: 

The best advice I can give is if you don't know why you need a framework you should not be using a framework. Not yet, at least. After that? Zend Framework, but I'm a little biased. But the best advice is that you should not use a framework until you know you need a framework.

Kevin Schroeder
+1  A: 

I've agree with Kevin Schroeder. I use Zend and I found it had a steep learning curve. If your goal is to become more proficient at PHP, try writing your own framework.

Michelle
Even if you do use another framework, this is an important perspective to keep. Always try to identify if the code you're writing is application-specific, or if it could be used across multiple projects. If it's the latter, put it in your own framework/library.
awgy
niggles
+1  A: 

Personally I suggest Symfony - it's a large and powerful tool with great community.

Also I heard a few flattering reviews about YII Framework. They said that this framework finally implement MVC design patter as it should be implemented. Unfortunately as far as I know non of popular PHP frameworks implements MVC correctly...

Crozin
+3  A: 

I mostly enjoy the approach of F3:PHP.

Alix Axel
+1: This has got to be the easiest PHP framework you'll ever find.
stillstanding
@rockjock: Heh, that's very modest of you since you're the author. =P
Alix Axel
a recommendation coming from someone like you with 10.3k points, i'm inclined to believe you :)
stillstanding
+1  A: 

I recommend checking out the NOLOH PHP Framework, coming from a .NET background you should be able to pick it up easily. .NET devs say it's significantly easier and more powerful than ASP.NET.

Essentially you work on the server in a single unified language and NOLOH takes care of the plumbing for you allowing you to focus on your application. I recommend watching the recent screencast of the talk from Confoo, the two most applicable parts are the Live Examples and the Live Coding basics. You can check out the rest of the screencast if you're interested, but those 2 should get you started pretty quickly.

For a better idea of the power of the framework check out this Steve Jobs esque One More Thing.. showing automatic Comet http://www.youtube.com/watch?v=8r0FR0Dx4zE.

Enjoy.

Disclaimer: I'm one of the co-founders.

asnyder