Jump to content

Which Framework for Our Company?


Number1SuperGuy

Recommended Posts

The web development team I work for is starting to get projects with more in-depth PHP requirements, and it's becoming apparent that we will soon be able to benefit from using a PHP framework to speed up the development process. We know that the various frameworks like Zend, CakePHP, CodeIgniter, Ruby on Rails, etc. each have their own strengths and weaknesses, so we're trying to determine which one will fit our company the best.

 

Here's some information that will help aid in making this decision:

- We mostly serve small, local businesses

- We do a lot more work with content management and simple data retrieval than big web applications

- We're more interested in increasing development speed than being able to build the ultimate web app

- We'll need a framework with strong support and lots of documentation and tutorials

- The framework should be something that's future proof, so we don't learn a framework that goes down the tubes next year

 

I know beggars can't be choosers, and I really appreciate any help we get, but I'd prefer if you could specify why you would suggest a particular framework. A response like "CakePHP is the best. The end." won't do us any good, we need to make sure we're picking the one that's best for our company, not the one that just happens to be popular at the time.

 

Thank you very much for helping us in this important decision for our company!

Link to comment
Share on other sites

Hi, I have also made a decision to make use of a PHP framework, and since then I never even thought about going back... The host that I'm with made my list of available frameworks a bit shorter by not offering PHP 5 on their servers... So I could only have decided between CakePHP and CodeIgniter (let's be honest, they are the most popular of the ones still offering PHP 4). I finally decided to go with CodeIgniter because it was best for me... Everyone chooses a framework that is best for "them", it'll not necessarily be best for the next guy. But still I can't deny that being a PHP 4 compatible framework it'll never be perfect (keeping my fingers crossed for CodeIgniter 2 though)... But if you have PHP 5 in your toolbox, I would rather recommend looking at the more powerful options (Zend Framework, Symfony and Kohana). I don't have any experience in them, so I can't tell you for sure what's best, but everyone knows that the Zend is the most powerful of the bunch and that it has a wide range of extras that'll speed up development and even help you after your apps are launched...

 

But what I do know is that CodeIgniter is extremely well documented... You don't need any additional reading material, and the users are extremely friendly and are eager to help... And some other things I really like about CI, is the Active Record use for databases, the additional classes such as the Cart, Session, Database, etc. that is pre-written and ready to use and really easy to implement...

 

Lets go through your checklist:

1) For small business websites I will honestly recommend CI, it's fast... really fast... because it's loosely coupled and

    it doesn't have a lot of dependencies like CakePHP. Small business websites also won't need such a rigid

    system like that of CakePHP, and they normally wouldn't need an over-engineered framework like Zend.

2)Simple data retrieval - CI, once again... It uses the Active Record as I mentioned before, which makes simple data

  retrieval even more simple.

3)Increased development speed - Something that has auto code generating will make your development speed

  faster... Here Ruby on Rails (even though it isn't PHP-based) will win by far. As for the ultimate app part: Zend...

4)Strong support and and documentation - CodeIgniter!

5)Future proof - None of them... (PHP isn't going to last for ever, neither will Ruby, even Java will get it's fair share

  of "out-dated" prophecies)

 

Hope this helps a bit mate,

tell us when you found your framework  ;)

Link to comment
Share on other sites

I have only used Kohana and CodeIgniter. From my experience, CodeIgniter seems faster to learn, and performance-wise it seems faster as well. CodeIgniter also has really great documentation and an active community. One thing though... CodeIgniter 2.0 is about to come out, so you might want to adopt it as your framework when it does come out. That doesn't mean that you can't start playing with CodeIgniter though.

Link to comment
Share on other sites

When choosing a framework, you have 2 options:

 

1. You go for a glue-framework

2. You go for a full-stack framework

 

The difference lies in flexibility and the way you use it. CodeIgniter, RoR and CakePHP are full-stack frameworks, they provide you with everything you need to get going fast. CodeIgniter has a small learning curve and beats CakePHP on performance.

 

The catch with full-stack framework is that because they provide you with everything you need to get going fast, they also restrict you in freedom. It's for example not possible to switch from an MVC approach to some other architecture.

 

A glue framework provides you with components that can be used individually and do not force you to use them in a specific way. Zend framework is a glue framework but it has a hard learning curve. You can't rely on the ZF manual for answers as not all components are documented, leaving you with a lot of questions. Not all of ZF's components will fit your application, which is normal but due to a low abstraction and absent refactoring will you find yourself copy-pasting a lot of a class internals only to change a few lines to fit your needs. Nevertheless ZF is the best PHP glue framework around.

 

ZF is backed by a company and therefor you can find typical company support:

 

1. certification (ZF certified engineer exam)

2. training

3. consulting

 

There are other glue frameworks around, some claim to be a glue framework while they are in fact full-stack frameworks. A limited knowledge on glue vs full-stack will make you find out the hard way.

Link to comment
Share on other sites

I see people going 2 ways:

 

A CMS/Framework (and of these, the one that has the most traction is Drupal)

 

or a Framework with MVC.

 

Of these some were written in php4, and while many have been updated since php5, they still have php4 oop in them. This group includes Codeignitor and CakePHP.  Some people argue that this is a benefit because they are more "lightweight" and in the case of CodeIgnitor, there's a fork called Kohana that much of the CI community migrated to, AFAIK. 

 

The two heavyweight frameworks written post PHP5 come down to Symfony or Zend Framework.  Symfony was designed to be a ruby on rails for PHP, which is to say, that it relies on things like database reflection to provide object-relational mapping classes and batch code generation.  When you look at some of the demos they have, it's pretty slick stuff, and the people in charge of the symfony project eat their own dog food, so you know that things are actually being used by people, which in comparison to ZF is not always as clear, as I'll explain i a second.  With that said, Symfony requires in my opinion a major investment in getting up to speed, and is not a good candidate for converting or adapting it to an application that has already been written. 

 

ZF is much better suited to that, because it is both a class library and a framework.  You can use pieces of ZF easily and for the most part, it will work by itself.  So ZF is completely viable as a dropin for an existing application, where you want to migrate it over a period of time to a more robust MVC application. 

 

The flip side of that, is that ZF sometimes has classes where it's not clear that anyone is using the class, or whether it actually works the way the docs say it does.  In fact, for ZF and Symfony, although there's a lot of documentation, it often isn't up to date, and you sometimes have to read code, experiment and haunt the forums and mail lists, but then again, this is open source, so that's practically a given.

 

In my opinion, the most popular modern frameworks are ZF, Symfony and Drupal, and I'd recommend that you evaluate all 3.  The best way to do that is to have a spec for a small but functional application, and do a proof of concept in all 3 in order to determine which feels right for your shop.  It's not even important that you actually complete the full application -- you need to do enough that you get the shell up, and have at least a few working forms with some db interaction, which will reqiure you to get the frameworks or CMS installed, and enough pieces in place for you to interact with the community and the documentation.

Link to comment
Share on other sites

Or you can go with ZF or Symfony, which were written from the ground up under php5.

 

Look, I have nothing for or against CI, but if you're going to suggest that someone should consider it, you should provide some reasons why.

Link to comment
Share on other sites

Look, I have nothing for or against CI, but if you're going to suggest that someone should consider it, you should provide some reasons why.

 

I agree, put some weight to your decision. CI is indeed a good choice as it has a small learning curve, the documentation is well-written and easy-to-understand. However CI and full-stack frameworks in particular are a bad choice when you in the future may switch from MVC to some other implementation MVP, MVVC or HMVC.

 

ZF becomes the better choice when your development team already has a sound knowledge on OO methodology where-as CI almost entirely hides it.

Link to comment
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.