Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What are PHP Frameworks?

Featured Replies

Hi All

 

Can someone explain to me about PHP Frameworks?

 

I'm currently coding all my PHP from scratch on a booking system. I've been recommended that I should look into frameworks since they could lower my development time. Is this true?

 

I'm aware that Frameworks are bits of code already done for you but can someone give me an example of what they can actually do? Or a pointer on a good tutorial or book to start off with?

 

Yes, I have looked on Google - as always, information overload. I thought I would get some expert advice from you guys on here :)

 

Thanks

 

Simon

Frameworks are, in general, a collection of classes that take care of the common tasks encountered while building a site. For example, the Zend framework has classes to authenticate/authorize users, validate form input or access a database. Each framework has it's strengths and weaknesses - although without significant experience in the given framework it might take time to understand what those are. Most frameworks also tend to implement what is called the Model View Controller design pattern - a way of structuring code to separate business and presentation logic - which they achieve with varying degrees of success.

 

Many (if not most) frameworks have a process whereby they assemble the core components and folder structure of a project for you automatically on initial installation/setup. This can be quite confusing at first, and each framework does it slightly differently. In some cases it also indicates the framework's intended purpose. A lot of frameworks start you off with a simple blogging application...(but can leave you out in the cold once you get past that initial fun part). All the frameworks make extensive use of OOP architecture - and incur certain performance overheads as a result.

 

Codeigniter is renowned for it's ease of use, excellent documentation, but also for being potentially limiting and tied to PHP4. It's also made by Ellislabs, the people behind Expression Engine. Symfony is a heavy lifting framework, but quite slow. Zend is popular because it's made by the people behind PHP, and you are not committed to a pre-determined project structure (although it is quite hard to set up). You can also use the ZF classes individually - and to make your own frameworks (IF you can get your head round them). Cake is known for it's emulation of Ruby on Rails "code to a convention" methodology, DooPHP is a new one that is apparently very fast. Kohana PHP is a community driven branch of Codeigniter with a great reputation. Agavi, Seagull and Solaris also deserve a mention.

 

There are literally hundreds to choose from, arguably too many. Personally, I think you need to know your stuff re:OOP to be able to use any of these proficiently, or to extend them beyond their initial purpose. Personally, I've done a lot of research on these frameworks, but have yet to use any. I've rolled my own in order to understand the concepts and earn my OOP stripes, and now I'm thinking either Zend or Kohana.

 

Here's a great tutorial to explain Zend Framework, and also some of the key concepts behind MVC...

http://survivethedeepend.com/

 

Hope that helps.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.