Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Developing with a PHP framework

Friday, April 3rd, 2009 by Servage

frameworksThere are numerous advantages of working with a framework when creating and maintaining projects. Development work can be faster and more efficient when using a framework. It is easier to get things done, and it motivates developers to continue working. Often solutions to common issues are already available within the framework, so you do not have to reinvent the wheel every time you start a new project.

What is a framework exactly?
Wikipedia defines “a framework is a basic conceptual structure used to solve or address complex issues”. Plainspoken, in PHP terms, it means that you get a set of scripts that you build and base your application on. The advantage for you is that you can use a lot of pre-made things to speed up your work significantly.

What is required to use a PHP framework?
Having a fairly good understanding of PHP and object-orientated programming is an advantage to fully exploit all the features of a PHP framework, but even beginners gain from using frameworks, because the learning process while working is very high, and it makes the beginner program applications in a better way right from the start. It may seem overwhelming at first, but the time spent understanding a framework is definitely made up for later, when you start saving lots of time during your development process. Other than that, the only technical requirements is a web host that supports PHP (and databases).

How do I get started developing with a PHP framework?
First of all, you need to pick one. This may be the most difficult task in the beginning. There are quite a few frameworks out there, and you may want to try out more than one, to understand differences better. In this article I will briefly present some interesting frameworks that should be good options for most developers.

1) CodeIgniter - The easy framework that is known for exceptional ease of use, rapid development and high performance.

2) CakePHP – The popular framework that is probably the best PHP-version of the Ruby on Rails concept. CakePHP is used by several companies and has a very active community.

3) Symfony – The feature-packed framework that does it all, but is a bit slower than average.

4) Zend Framework – The heavyweight, corporate-level development framework that also does it all, but requires extensive PHP understanding to become a real benefit for developers.

5) There are more frameworks out there, but unfortunately it would be beyond the scope of this article to present them all.

Which one to choose?
Personally I prefer CakePHP due to it’s available features, strong concept and very helpful and active community. However, for you, the bad news is: It’s really hard to determine what framework is the right one for you, and will provide you and your project with the most advantages. The good news is: You will most likely get an (highly) improved development process with any of the above frameworks, no matter which one you choose. The choice is yours ;-)

What to do now?
I recommend you spend some time researching and maybe even testing frameworks before you pick one. Here is a good article that explains some differences between Zend Framework, CakePHP and Symfony, just to get you started.

Developing with a PHP framework, 4.3 out of 5 based on 26 ratings
Categories: Servage

Keywords: , ,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

14 comments (leave a comment)

Nice list of frameworks. Do not have the time to try them all. But i wanted to say, Thank you.

Go to sourceforge.net for more open source frameworks.

Good complied list & comparison of PHP frameworks but you really miss a big one, it ez components.
I personally support for symphony, ez components. Thanks

But as far as I can determine, you can’t install Symfony using PEAR, so that’s (in my opion) a big downside of those frameworks. I’m currently using Zend Framework, and used to use Kohana, but I’d love to use CakePHP or Symfony because of it’s RoR technique…

Nevertheless a good article. *Thumbs up*.

Prado is also a good framework !

Here’s the site listing many PHP frameworks with a feature matrix:
http://www.phpframeworks.com/top-10-php-frameworks/

Personally I love cakephp, I’ve been using it for over a year now, all the php sites I make now are made with cake.

The reason I like it is the MVC structure, I’m used to programming like that. It also performs very well. It used to be a bit slower(but still very good) before they did a release targeted performance.

It’s also easy to find examples on the internet, it’s always helpfull to see how other ppl do it.

This is one of the sites I build with cakephp: http://crazytje.be , it has about 20k visitors/day and the server it’s running on still has plenty of resources left.

A few of the things I like about it is the fact that you do not need to install anything, I can just copy the files over and it’ll work.
I use it for a couple of small sites on the servage servers.

Also enabling an opcode cacher(I use apc) is as simple as it can be, just uncomment a few lines.

Or another thing I use that is build into cakephp is database oriented sessions(not file based)

I started using Cakephp after I saw a demo/presentation about it at fosdem last year(in burssels – belgium).

For me Using a PHP Framework on developing websites is very useful for me. I used to create, design and develop websites with a PHP Structure, in that way it’s much easier to create a fully and functional website.

i’m new to PHP (altho have years of experience with java SE/EE). i have started with CI (code igniter), and have really been impressed with the low cost upfront of getting up to speed, and once there, the rapd pace of development.

but its not just a VB lookalike (as seen from a java developer) – it is very nicely structured, full MVC seperation, and with lots of helpers, libraries and plugins. i find i’m spending my time with “application” code and not architectureal/plumbing code – and thats exactly what i want.

in fairness i haven’t looked at the others, but a big thumbs up for CI!

Another excellent one is Kohana

(www.kohanaphp.com)

It’s a fork and rewrite of Code Igniter (now one a completely dfiferent code base). Fast, PHP5, compliant and a great user community :)

I use it exclusively.

Let’s try CodeLighter – its a simplified CodeIgniter-like framework:

http://code.google.com/p/codelighter/

I must say that Symfony does not require PEAR to be installed, although it is the most convenient way when you have access to the server. Usually you will have a local server with a PEAR-installed Symfony and then you freeze the project (that is, copy the framework library to the project directory) and upload it to the server.

comments treaty occurred million rss 2001

Thanks a lot for ur nice suggestion. In my opion try Symfony, because it is full of OOPS concepts. Because the next generation is all about OOPS. Try it!!!!!!!!!!!!!!!

Leave a comment

You must be logged in to post a comment.