Jump to content

Recommended Posts

See, I was trying to research this earlier. From what I understand, there is no right or wrong or best framework. It is all dependent on what works best for you. Personally I am looking at Zend and Codeigniter. I like the sound of Zend, because it is from the makers of PHP and I feel it will be the best one to use if I want to take advantage of the latest stuff. Codeigniter supports php4 so I guess that would be a good option for backwards compatibility (even though I hear that php4 is getting more and more obsolete by the second).

 

I too would be interested to hear any other ppls experiences with PHP frameworks.

Link to comment
https://forums.phpfreaks.com/topic/227316-which/#findComment-1172583
Share on other sites

I've built applications with codeigniter, cakephp, and kohana, but in the end settled on codeigiter.  Codeigniter is very well documented, especially compared to kohana, and I like that codeigniter isn't very strict when it comes to MVC.  Cake is well documented and is great for rapid app development, but I found the learning curve to be a little steep.

 

All in all their is no wrong answer, test out a couple and pick the one you are most comfortable with.

 

By the way codeigniter dropped php4 support with it's latest release (2.0.0), so if your looking for backward compatibility you will have to use version 1.7.3

Link to comment
https://forums.phpfreaks.com/topic/227316-which/#findComment-1172611
Share on other sites

By the way codeigniter dropped php4 support with it's latest release (2.0.0), so if your looking for backward compatibility you will have to use version 1.7.3

 

PHP 4.x is dead, kaput, end of life.  Nobody should be writing code for php4 or considering any framework that was built on it, in my opinion.

 

Right now, the best 2 frameworks for PHP (both of which were written starting with php5) are Zend Framework and Symfony.  I have used both for projects so I can speak with experience on each.  Symfony has some excellent documentation, and is highly focused on productivity in the same way that Ruby on Rails was designed for productivity.  It comes with an extensible automation system that generates your databases, models and base forms, and supports two of the best known PHP object-relational mapping (ORM) libraries - propel and doctrine.  It can also be used to generate admin/CRUD screens and has a plugin architecture and a number of plugins that provide advanced capabilities like sophisticated user/group permissions, or drop in image thumbnails.  The company that supports it uses it for their own projects, so they're continually improving it, and have even done a ground up rewrite that takes advantage of the oop improvements and features like closures in php6.  Symfony does force things like yaml files down your throat and some of the "configuration rather than coding" philsophy can be intimidating, when things don't work the way you want them to.  People have the same complaint about Ruby on Rails.

 

Zend framework is more of a massive programmers library, that focuses on the implementation of solid design patterns, but doesn't commit you to any particular approach, so in that way it attempts to be both a framework with an mvc implementation as well as a library of routines that support nearly anything you can think of.  For example, you can easily pull out one class (the view class for example) and drop it into your application.  That's not the case for other frameworks.  Every piece is highly decoupled and independent, which depending on your point of view is either a great benefit, or incredibly over-engineered.  I think that if you're already a real expert both in PHP and in common design patterns like MVC, you might find it liberating, and some of the features like the form validation system is really inspired and amazingly powerful.

 

I have nothing against CI, cakephp or Kohana as nearly all of them have solid communities, but the same could be said of Joomla and Drupal.  Often they argue that they are "faster and leaner" which really means that they don't do that much and offer little to no flexibility if you have a need that goes beyond what they do out of the box.  The internals are also basically pure php4 oop, with minimal changes.  I commend the CakePHP team for realizing that they needed to rewrite from the ground up, because design patterns are a product of OOP, and you need the features that were added in php5 and 6 to really do those design patterns justice.

 

For anyone who is a beginner-to intermediate developer, you're going to find that a framework is a challenge to learn.  The best way to make this decision is to make a small test app in each and see which one appeals to you.  Currently I'd advise that decision to be focused on symfony or ZF, and for most people, Symfony will be the one that's easier to learn and become productive in faster.

 

 

 

Zend is more of a programmers library.

Link to comment
https://forums.phpfreaks.com/topic/227316-which/#findComment-1172625
Share on other sites

That's a very nice overview. Very informative. So in other words start out learning "Symfony" then once a decent amount of experience in OOP is gained, go with Zend?

 

I guess the biggest fear I have, is that finding a framework that "does everything for you" will then lead to laziness and poor understanding of the code?

What are your thoughts on that? Of course this is coming from someone who has no exp with a framework yet.

Link to comment
https://forums.phpfreaks.com/topic/227316-which/#findComment-1172647
Share on other sites

No I'm not saying that you go with Zend once you learn symfony.  They are both fully capable of doing even complicated applications and have very similar features, approaches and capabiltiies.  Symfony is just simpler and easier to learn, and because it generates code will get you up and running faster.  ZF is more flexible, and also has general purpose features.  For example, I wrote some rss feeds for a company that had completely custom code.  I could do that because ZF includes rss feed classes.  Other frameworks might have those included somewhere but they weren't designed to be a class library.

 

Based on what I know about both frameworks and my own experience, it's my opinion that someone who is newer will have an easier time with Symfony, partly because they have a "symfony" way of doing things, and also probably because most of it was designed by a single person, whereas ZF is an amalgam of a lot of different classes written by different people. 

 

In summary, you use a framework for a number of reasons, not the least of which is that it should do a lot of thing for you.  If you want to call that "laziness" well that's not really a bad thing.  The longer you work with a framework the more you will come to learn about its internals.  You also will probably have to learn a fair amount about PHP oop to keep your bearing in any decent PHP framework these days.  No matter how good the docs, there will be questions that come up, and issues debugging code, and you need to have an idea how to get your bearings.  That's actually another thing about symfony that reflects its pragmatism, in that it comes with a developer controller that displays a debugging bar for when you're developing.  With ZF, while they have classes that help with debugging and logging, they don't give you an out of the box solution like symfony.

Link to comment
https://forums.phpfreaks.com/topic/227316-which/#findComment-1172653
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.