Live data from Hacker News

Ask HN: Best PHP Framework for Web Development

news.ycombinator.com

1–10 of 23 posts

Ask HN: Best PHP Framework for Web Development

#1
I have been working with PHP for almost a year now. And I m quite familiar with the language. So I was thinking to start using a framework for my next project.

I m actually really confused as there are so many good frameworks with such good features with docs & extensions. I m really actually looking for a decent framework which is really easy to use. I ve considered Yii, Zend, CakePHP.

Would like to know about your experiences about these frameworks!

Re: Ask HN: Best PHP Framework for Web Development

#2
Zend Framework is the traditional 'enterprise' framework, you won't go wrong with it, though there are quite possibly better alternatives. That's what we use where I work.

I've heard very good things about Kohana but don't have much experience with it. Just try and pick something with a good set of documentation and a decent community.

Re: Ask HN: Best PHP Framework for Web Development

#3

Zend Framework is the traditional 'enterprise' framework, you won't go wrong with it, though there are quite possibly better alternatives. That's what we use where I work. I've heard very good things about Kohana but don't have much experience with it. Just try and pick something with a good set of documentation and a decent community.

Sure !! And well thats the confusing thing for me.

Every framework comes with some pros and cons and it is really tricky to decide which framework to go with.

Re: Ask HN: Best PHP Framework for Web Development

#4
I don't think it matters too much when starting out. For a beginner (in the framework, not coding in general), they are all relatively equivalent.

Pick a framework and begin using it. After a few projects, you'll quickly learn what you like and don't like about the framework.

I'm a fan of CodeIgniter, but mostly because it is what I'm familiar with. It has some irritations and kludgy things required, but they don't annoy me enough to warrant a change (yet).

Re: Ask HN: Best PHP Framework for Web Development

#5
Depends on what you need it for. Different frameworks handle different situations better than others. If you haven't had the need for a framework yet, then perhaps you shouldn't bother too much with looking. I generally start reaching for tools when I feel that what I'm currently using could be improved on.

Most PHP frameworks are just some sort of approach to the Model-View-Controller pattern and a collection of libraries for helping with typical things that you might deal with in web development. You can mix and match libraries from different frameworks and they all have their different methods of usage.

I would probably go with something simple, lightweight and well documented. Some frameworks have so many steps and focus stealing side shows that it's a project just to get started with the things.

Maybe take a look at Fatfree (http://bcosca.github.com/fatfree/) and then expand into other frameworks from there if it doesn't do what you need it to.

Re: Ask HN: Best PHP Framework for Web Development

#6
Depending on what you do your mileage may vary.

What I was doing didn't fit in with what the then current frameworks offered - so I made my own... and that's how all those frameworks got their start as well.

My suggestion is to look at the various framework features and see which one best suits your needs.

Re: Ask HN: Best PHP Framework for Web Development

#7
I would start with Silex. It's a very small framework, pretty well written, and very easy to pick up:

http://silex.sensiolabs.org/

It's also supported by Sensio, who has a good track record. I'd pick it over Symfony because it's more lightweight and over Kohana or CI because it has better documentation.

Cake will lead you down a dark path, and ZF is bloated and unwieldy. Yii seems nice, but I think they lack direction.

Re: Ask HN: Best PHP Framework for Web Development

#8
post #7

I would start with Silex. It's a very small framework, pretty well written, and very easy to pick up: http://silex.sensiolabs.org/ It's also supported by Sensio, who has a good track record. I'd pick it over Symfony because it's more lightweight and over Kohana or CI because it has better documentation. Cake will lead you down a dark path, and ZF is bloated and unwieldy. Yii seems nice, but I think they lack directio…

>Cake will lead you down a dark path

Why is that?

Re: Ask HN: Best PHP Framework for Web Development

#9
I favour Kohana (http://kohanaframework.org/). Very quick and easy to get the core of your app built. Only (and potentially major) downside is that the documentation can be tricky to wade through.

I'd run away from CakePHP. Caveat: last version I worked with was 1.3. The weird way it uses arrays in its ORM to kinda-sorta-but-not-quite work on the database always hurts my head. In fact, the whole way of going about things in CakePHP hurts my head.

Re: Ask HN: Best PHP Framework for Web Development

#10

Zend Framework is the traditional 'enterprise' framework, you won't go wrong with it, though there are quite possibly better alternatives. That's what we use where I work. I've heard very good things about Kohana but don't have much experience with it. Just try and pick something with a good set of documentation and a decent community.

Sure !! And well thats the confusing thing for me. Every framework comes with some pros and cons and it is really tricky to decide which framework to go with.

I think in that case Zend Framework might be a good choice. It may not be the sexiest framework but it's developed and supported by Zend, the company behind PHP. It isn't going to fade away any time soon and there's tonnes of support and advice around.
Post reply on HN