Alex Rivera | Logout

To Use a PHP Framework or Not?

Asked 2009-05-03T13:47:28.000
34

I've started writing a few applications in PHP, and I'm becoming more familiar with the language. Someone told me about CakePHP, and CodeIgniter. I wanted to get a better understanding of how these could help me, and whether it's worthwhile spending the time to learn a framework?

Edit
Report

2 Answers

5

Diclaimer: I'm NOT a php programmer and I have not EVER written a php application. On the other hand, I have installed, customized and used alot of php cmss for my site and shopping carts.

In my opinion php suffers from serious problems. The biggest one is that “framework” seems to be a foreign word for almost all big and even successful projects. Php code tends to become quickly spaghetti salad: spaghetti html mixed with spaghetti code and spaghetti sql.

osCommerce, one of the most successful shopping cart ever, is mostly unmaintable. That applies also the big majority of php projects.

Whether you should use a framework for you project, I say yes! Definitely! No matter how big is your project, using a web framework helps you tidying you code up and writing maintable code.

It also impact your programming style even when you are not using a framework.

answered 2009-05-03T14:08:53.753
1

The following post is in response to a thread that was immediately closed as I was writing my answer to RenderIn's post at: https://stackoverflow.com/questions/3265509/what-are-the-benefits-of-using-a-programming-framework . The thread was closed and in the comments a link was placed directing him to here, so I'll attempt to answer his question here. In quotes below is what I was ABOUT to submit:

"Allow me to recommend Joomla! to you and your organization. At my last employer, I had to pick-up PHP (having no prior experience with it), and after about a month and a half of doing some manual hand-coding of PHP, I was tasked to code a Joomla! component that would serve-up videos to users. I also had to create a backend that would allow non-techie administrators to categorize, edit, delete, etc., the videos as well as provide thumbnails for them, etc.

Now to get a working prototype for that, it took about two months (I was an intern at the time and only working 20-24 hours per week, so if you have quite a bit of PHP experience as well as experience with MVC development methodology, you probably could've gotten a working prototype up a LOT quicker than me)."

Now in response to the OP of THIS thread: Spending the time to learn a framework is definitely worthwhile (I haven't seen it mentioned in here until my post so I'll say it again: for a PHP-framework I'd recommend Joomla!).

Some of the benefits of learning a framework (an open-source one like Joomla!):

  • A huge community of people who can help answer your questions (besides stackoverflow; lol)
  • Access to ALL of the source code, so you can customize it however you want.
  • Lots of free (and paid) third-party plugins to enhance functionality.
  • Lots of tutorials.
  • Frameworks take care of performing a lot of mundane tasks automaticall
answered 2010-07-16T14:23:42.803

Your Answer