I’ve become interested in learning a PHP Framework (in addition to the WordPress CMS) for two reasons. First, I’ve been looking at PHP job listings and experience working with at least one framework is required for most mid to senior level developer/software engineer jobs.
The second reason I’ve decided to learn a PHP framework is that I have an idea for expanding my Amazon Search program and I like the advice to “always be learning something new.” I think this advice comes from the book Coders at Work by Peter Seibel, but it’s possible that the advice is really from some other place… But it makes sense that I might as well improve my skills while I’m also improving my application.
So I’ve been spending my last few evenings drawing UML class diagrams (as well as flow charts) to plan out my program’s design. I also spent a day getting the Laravel framework set up on my development server. So far, I’ve set up a Laravel program that does basic CRUD and I can see why people want to work with Laravel. The hardest part, after initial set-up, was not overthinking things! Laravel has a lot of “syntatic sugar” so the code is easy to write and read, but debugging is a pain because functions are hidden inside of traits and behind facades.
Before choosing Laravel for my project, I did some research on PHP Framework popularity. I searched the job hunting website Indeed.com for major frameworks along with the keyword PHP. This is what I found:
Framework Popularity based in Indeed Job Openings
For that graph, I omitted the frameworks with 20 or less mentions, which were Aura, Apigility, and Phalcon.
As you can see, I included both Model-View-Controller (MVC) frameworks as well as Content Management Systems (CMS). While some applications could use either type of framework, in general a CMS is designed for a blog type site or a site managing a lot of content.
For CMS Frameworks, WordPress beat Drupal by a few hundred listings. This is for a nationwide search that also included the keyword PHP. This was to hopefully exclude jobs that weren’t true PHP programming jobs (like WordPress front-end design or WordPress website management or WordPress Marketing or WordPress SEO), but because this search included jobs that list PHP as a “nice to have” skill, the actual number of WordPress backend PHP programming jobs is probably significantly lower.
As for the MVC frameworks, Laravel and Zend were the most in-demand, each having over 700 job openings. One word of caution about this result is that some job lisitngs state something like this “Requires knowledge of an MVC PHP Framework, such as Laravel or Zend.” In this case, they are just giving an example of a popular one, but if you were familiar with CakePHP or CodeIgniter (both MVC Frameworks), then you would also meet that job qualification.
What PHP framework should I use?
Ultimately, you should either search for local jobs and find companies that you want to work for, or search for open source projects that you are interested in, and use the same frameworks that they are using.
Tip: You can use the website builtwith.com to find out what frameworks and other technology a website is using.
An experienced programmer can learn a new framework with relative ease, so once you have strong experience with one framework, you can probably quickly learn another if needed.
What PHP framework should I LEARN?
Another option for choosing a framework is to look at the availability of tutorials and books. If you can find a tutorial or book that covers the topics you’ll need for your project, in a learning style that you like, then perhaps you should use that framework. Finding a good instructor or mentor is GOLD! So, find the best source for learning whatever it is that you want to do, and then use the same frameworks and tools that they are using. There are a plethora of code instruction websites that have video tutorials and online courses. Most do cost something, but I’ve found free access to Lynda.com through my local library, Udacity has deeply discounted sales regularly, and Pluralsight gave me a couple of months free as a promotion, so if you join the mailing lists of these educational sights, you might find a low-cost deal.
Do I NEED a PHP Framwork?
Like most everything, there’s both positives and negatives.
Positives:
- A good framework will save you time because it provides basic functionality common to
many programs so you don’t have to reinvent the wheel! - MVC Frameworks help with code organization.
- A framework may make it easier for other programmers to understand your code.
- A well-established, open source framework means more eyes on the code and lots of
bugs already fixed
Negatives:
- Frameworks can take awhile to set-up and learn.
- It may be harder to debug code if you don’t understand the framework thoroughly.
- Applications may be slower and larger if the framework includes a lot of code that is not relevant to your project.
- Your application will depend upon the framework’s continued support and updates (you’ll have to update the framework, especially if security issues are discovered.)
why are you mixing frameworks with CMS .. which is completely different