tags:

views:

645

answers:

6

hi, I am running a site about PHP Frameworks, but I can't find a exact definition for it, and I am always thinking a question, how to make out a good PHP framework? Features? Manual? Efficiency? Or something?

I want to know your point.

thanks.

wood

+2  A: 

Hey!

A PHP Framework in my eyes is a collection of classes which help you develop a webapplication.

In my company we use Zend Framework. I have to say, that getting started with this Framework is pretty hard but if you get how to use the API and the Reference Guide you have a great Framework. Also its interessting because they have Zend people sitting on the project so they can use those internal tricks and get some performance boosts others can't get.

What also differs ZF from others is the appility to create MVC programms with no big hassles.

I hope it helped :)

Thomaschaaf
+6  A: 

Asking a programming forum what is a good framework is like asking a car forum what is a good car. The opinions vary wildly, and in 95% of cases, it really doesn't matter what you choose, as long as it's actively developed. Most of your replies will be based on religion and not subjective comparisons. :)

Fuzzy76
+7  A: 

Essentially a framework is the structure that you can choose to build your program on. It can allow you to connect to many different API's as well as determine the structure of your own application. I use the Zend Framework. It's not the easiest to learn, but certainly has everything you need for a great application. I would suggest going through the QuickStart guide on the site to get the ball rolling with this. It uses Model-View-Controller which is essential in my opinion. Once you have it configured, it makes things extremely easier!

Other frameworks include CodeIgniter and Symfony. Some like CodeIgniter for its smaller footprint. It's all a matter of preference. Whichever you pick be sure to use the documentation on the sites as it is essential to understanding how best to use it. Also, don't be scared to peak at the code every once in a while just to get a better understanding of how things work.

Matt
+1  A: 

PHP framework is a library that makes the life of site developer easier by for example hiding some complexities of HTTP protocol or by adding some useful functions. For example the CakePHP implements so called MVC which makes developer to think a level higher than HTTP. This is what I have learned so far.

grigy
It also chains you to PHP4. Dear lord no. D:<
Rob Howard
It doesn't anymore. I know I'm replying to a two years old post, but I'm just making sure that someone who reads this to learn about frameworks (e.g.: me) doesn't think it's still the case. :)
domsterr
+7  A: 

Frameworks provide scaffolding that can allow you to develop faster/more cleanly. They often provide toolsets for both the UI components and the underlying database access.

For (very) small projects, a framework can be overkill, but often, it's helpful to provide you with a lot of reusable code.

Some notable frameworks for PHP : Zend Framework CodeIgniter Symfony CakePHP Mojavi

A comparison chart. A more detailed review site.

Rizwan Kassim
Not all frameworks use scaffolding, ie. code generation. I think at least Zend and CI doesn't do that.
PhiLho
+1  A: 

There's a lot to be said for frameworks - and good posts here. However be aware that they are not always the best solution. Reasons you might prefer to avoid them are

  1. Because of the codebase size they tend to be slow (I've seen figures of 10 times slower simple PHP embedded page delivery quoted for Zend for example - admittedly one of the larger ones).

  2. They can be inflexible outside the 'domain' they are intended to work with. Extending a framework to do something that is non-standard can be much more difficult than just coding from scratch.

  3. Some sacrifice of modularity is required. The advantage of using a more simple template/control file system (such as TinyButStrong) is that each page is a distinct unit, which naturally tends to make your system easier to unit test and robust.

  4. They tend to be vulnerable to version control issues. It's all very well and good developing your first one, but after you have a dozen or so websites developed you'll most likely find you've been using three or four release versions of the framework and you have a mish-mash of codebases to work with - and syncing everything takes time you probably won't have.

None of the above are conclusive arguments against using a framework, in many (most?) cases the advantages will score more highly, but you should not be reaching for one without first considering what your requirements are and what is the best solution for each particular problem.

Cruachan
do they update the frameworks (like Zend forexample) to work with new PHP versions without the need for me to change my code? except replacing the framework with the new one)...?
MAK