What PHP framework should I start with?

I have books and material for codeigniter(CI)… But most people that i ask online said zend is the future of php…What say u all. Should i start with codeignitter or ZendFrame work…

Thanks for ur reply

If you have never worked with any PHP framework then you should definitely start with an easy one. Codeigniter is the right choice for you. Zend Framework is good one, but it is really complex for a beginner.

thanks…@jakup

@ebiwari

I would recommend Symphony, active community, very well designed code base, good documentation.

Try your best to get started right as it takes considerable time to become proficient at any framework.

Regards,
Steve

Symphony is one of those “big frameworks”. I would rather begin with small one like Codeigniter.

@steve
Thanks, I will check it out
Regards

I think starting with CI is my best option Tanks jakub

I prefer Symfony because it has both a solid core and integrates other very useful projects such as; doctrine, twig, php unit and assetic to name a few. I like how it only does so much and leaves other things up to more appropriate projects.

Another big thumbs up for Symfony.

Thank god nobody said “write your own”, oh, wait … :slight_smile:

Easy start? CI

I would definitely recommend CakePHP

I use Yii myself, which is pretty easy and has a small learning curve, due to lots and easy documentation. However I have to admit that I’m pretty impressed by Symfony2 as well.

As for Zend, just don’t go there. It’s way too bloated to use as a learning framework. It’s nice for really (really!) big projects, but for small(ish) projects it’s overkill.

I started on CI, have looked at several other and finally settled on fuelphp.com

CI was designed as a PHP4 framework and unfortunately although it now uses PHP5 code, it still feels like PHP4
Zend is too big
CakePHP is too bloated
Symfony is too complicated (for a beginner)
FuelPHP is just nice to use.

very funny:lol:: I think every body is understanding the three law of programming… Reuse Reuse Reuse

Symphony is for people who’d rather be using Python but aren’t for some strange reason.
Cake is for people who’d rather be using Ruby on Rails but aren’t for some strange reason.

Zend is just…

One of the reasons there are a lot of frameworks out there is there are no good frameworks out there, in my opinion. And having been working on one in my spare time I understand why - it’s hard. All the same, do not learn a framework - learn PHP. All of the frameworks have trade offs in their designs and all of them have quirks.

Hi Michael,

Some alternative thinking about why or why not frameworks:

To your point

it’s hard. All the same, do not learn a framework - learn PHP
It is important to learn PHP and learn it well before jumping in a framework it enables one to understand the tradeoffs of a framework. However most teams I have worked with have either been using ZEND or Symphony; it was a requirement to have working knowledge in these frameworks to land the job. Increasingly (wrongly or rightly) web development shops around our part to the world require that you have both PHP and Javascript OOP experience, plus experience with Zend or Symphony.

Some people will also take a long time and may never reach the level of development acumen that you possess so for them it is important to have something like a framework that has good documentation and supportive community to help them along. Lets face it, frameworks impart a process and methodology on the developer that being a RAW coder does not implicitly impart; for many people this process helps them.

Owners of companies also get nervous about custom code in their shops as it is too easy for the developer with the knowledge to ‘walk out the door’, leaving the remaining programmers in a bind.

Knowing how to RAW code is very important as it is somewhat regular that one has to not use a framework for a specific project because the framework ‘tradeoffs’ will unacceptably get in the way. Recently I was asked to do a system that could not make use on any other license (aside for the database and php), which meant all the classes needed to be written from scratch (no reuse); I was able to get this job because there were few others that had recently been RAW coding, working instead in ZEND or Symphony frameworks.

Because ‘A framework can do it…’ attitude has become standard, the days of people talking about proper OOP and project development have waned - one reason for the PHP Application Design Forums death. I can’t say for sure, but one of the reasons that you try to keep the torch alive here is because there is the need for people to understand the growth of PHP and in context, the coding approaches, design patterns, and test methodologies that apply. Their is a need for knowledgeable people to support others in these areas, so I am glad you are here :slight_smile:

The proliferation of frameworks has a purpose to companies and that is to combat project complexity growth. Consider the following graph

While Mark Rosewater is talking about the game Magic: The Gathering in this graph, the underlying principles apply to any long term collaborative cumulative process, such as the code that a company uses. As time goes by the project will perforce become more complex (the green line). The use of frameworks allows the starting level of the red line to be raised, and reduce the gap between what the programmer knows and what he needs to know before he can actively contribute to the company. Companies with poor management suffer and often eventually die from this problem, especially when obstinate management refuses to allow projects to be restarted.

Because at some point, you have to roll over and do a new version, taking your experiences from building the current version with you and using them to build stronger code.

By building code along a framework a company can reduce that critical lag time from hire to contributor. From management’s standpoint, this is the most critical reason to want to hire coders who understand frameworks.

Frameworks are, at the end of the day, tools. Despite my somewhat catty comments earlier I understand them for what they are. While you may need to learn a framework or two to get a job, you’re better positioned if you understand the underlying rules of the PHP language itself. Beyond that, you need to have a firm grasp of programming concepts as well. As a beginning programmer this is where your focus needs to lie. Frameworks do a lot of the work for you, but they are a dangerous shortcut if you let them cheat you of developing a true understanding of code structure. Concepts aren’t going to change much even between languages. While its been a long time, I know I can get up to speed with C# or Java because fundamental concepts don’t change between languages. Different languages just have different ways of doing things.

I will second Michael’s comment and agree that when it comes to PHP there isn’t one great framework that exists. They all have their advantages and disadvantages. It is something you need to accept or given the budget write your own which will in inevitably have its own set of weaknesses and strengths. It always comes down to what needs to be sacrificed to be gained like anything. I also agree that one shouldn’t be using frameworks until at least an intermediate understanding of any language and related principles are understood. Frameworks add a whole new level of complexity that is just makes things much more difficult to understand. However, that is a sacrifice that comes with reuse – abstraction and modular code bases.