Label: frameworks
Friday 24th January 2014 Spotlight on SymfonyNext up in our framework review is the ever-popular Symfony, which is now well into its second stable version (2.4.1, released in early January of this year). Symfony2 captured a 10.62% share of the developers polled on Sitepoint at the end of 2013, making it the third-most popular framework among the responding PHP developers. It has achieved this placement with good reason, as it's widely used across the web, providing a mixture of robust community support and feature-rich libraries.
The brainchild of the same developers who founded the French web design and development agency SensioLabs even before beginning to develop Symfony, Symfony begins with an excellent base to expand upon. As we discussed in a recent post, SensioLabs has even gone so far as to acquire venture capital, with the main purpose of the funding being the expansion and support of Symfony for development projects around the world. The $7 million USD provided by CM-CIC Private Capital will go quite a long ways when it comes to setting up the resources required to support and encourage the adoption of Symfony, so expect this framework to be growing rapidly all around the world in the months and years to come - it seems to be the only PHP framework with corporate sponsorship.
This level of commitment has created an excellent community of active developers who are working with Symfony, further reinforcing its usability. Even major corporations have signed on to use Symfony for their development projects, including the search engine Yahoo! and web video giant Dailymotion, not to mention phpBB, the most widely-used PHP-based forum service on the web, and the open-source PHP CMS Drupal.
One of the major strengths of Symfony is the modular nature of the software, which allows for a greater degree of flexibility when it comes to development, as it is itself modular from the ground up. In short, it plays well with almost any other standard component of PHP that you're comfortable using in your development process. It's arguably the most feature-rich framework that we've looked at so far, but that comes with a bit of a downside when it comes to bloat. Even the developers who voted it up so high in the standings at Sitepoint were the first to admit that it lagged well behind others when it came to performance metrics, which should be a concern for many developers looking for a slightly more robust framework.
Thursday 09th January 2014 Focus on PhalconAccording to the Sitepoint poll of PHP programmers we mentioned a few weeks ago, the second-most popular framework after Laravel was Phalcon. This is a fairly remarkable achievement, considering that the framework itself is only about 2 years ago, near the beginning of 2012. As the internet grows by leaps and bounds, and traffic grows right along with it, there's bound to be a greater and greater focus on performance issues, and this where Phalcon really distinguishes itself from more typical PHP frameworks: as its documentation says, "Phalcon is an effort to build the fastest framework for PHP."
So how does it manage this? It's primary advantage comes from the fact that it's entirely C-extension-based. Not a very common strategy among popular PHP frameworks, being coded in C gives Phalcon the majority of its performance advantages. The C extensions are loaded at the beginning of web server's process and then reside in RAM, allowing Phalcon to process over 2300 requests per second, nearly three times as many as CodeIgniter is able to manage. Other than this aspect, however, it operates more or less the same as any other modern MVC-framework for PHP, offering an array of features you've come to expect like object-relational mapping, a query language, a templating engine, and other such goodies. Add in a burgeoning community of other developers working with the language, and you begin to see why Phalcon has quickly risen from relative obscurity to become one of the most appealing frameworks for your upcoming large scale, performance intensive projects.
The success has driven development fairly quickly as well, and Phalcon 2.0 is in the works, with the first alpha version already released. There are a fair number of changes under the hood, which should ease the concerns of some developers who have resisted Phalcon and other C extension frameworks for the simple fact that they don't know C very well and aren't keen to learn. This made it very difficult to do any sort of bug fixing, in the unlikely event that something went wrong. The new version of Phalcon has the majority of its behind-the-scenes processes recoded in a language called Zephir, an open-source language that compiles and runs with a speed similar to C. If you're interested in helping test-drive the alpha version of 2.0, they're always looking for more assistance!
Monday 30th December 2013 A Look at LaravelFrameworks, frameworks frameworks - like the old adage about real estate locations, frameworks tend to be on the tip of every PHP developers tongue these days. The relative merits of each one are up for debate, and many developers fiercely defend their chosen framework against any possible slight, real or imagined. While many contend that it's more important to choose the right framework based on the particulars of a given project, there are still wide disparities in the usage of the various options. As we saw in our look at the usage statistics that are the obligatory part of the 'end of year' type blog posts, a clear frontrunner has emerged from the PHP framework pack in 2013 and outpaced all the rest: Laravel.
Fully 25% of all PHP developers responding to a poll hosted by developer hub SitePoint said they use Laravel, which makes it easily the most popular framework around. This is by no means completely scientific, as this data was gathered by a single site, and there are plenty of ways the data could be distorted, but regardless, Laravel merits a closer look for those of you who are still unfamiliar with it.
Often touted as a spiritual successor to the now relatively defunct CodeIgniter framework, Laravel is famed for its simplicity of use and gentle learning curve, which is no doubt part of the reason it scores so highlight on the SitePoint poll. Already up to version 4 at the time of this writing, Laravel has developed quite a large community and so overcome some of the initial trepidation that developers had when it comes to adopting a new framework. It's even reached a point where the first Laravel conference will be held this year in May, Laracon 2014 in New York City.
Those who've embraced Laravel rave about its intuitive usage, easy routing and that it comes out of the download with Eloquent ORM, which plays nice with all manner of database formats. This is especially useful now that the latest version of PHP are starting to deprecate MySQL extensions in favour of MySQLi and, even better, PDO, which Laravel plays quite nicely with. The framework itself is built on a number of components from the well-known Symfony framework, which also lends weight to its stability, reliability and credibility.
So whether you're a new PHP developer looking for a framework to whet your appetite or a framework-weary old hand, you'll likely be able to find something to catch your interest in the Laravel framework.
Posted on December 30th 2013 at 08:32pm
0 Comments
Tuesday 24th December 2013 PHP Frameworks: 2013 Roundup and Looking AheadAs 2013 comes to a close and we reach the season of holidays, the new year, and year-end statistical roundups, many people are curious about the state of the PHP framework debate. As with many debates among programmers, the opinions are often loud and tenacious, and understandably so - it tends to irritate us when other people don't see the same advantages that we do (ah, the perpetual design versus development debate). With that in mind, one of the best ways to compare the relative metrics of the available PHP frameworks is to look at how many people are using each one over the course of the last year.
As you're no doubt aware, there are many, many frameworks to choose from, but most of them capture a relatively small percentage of the so-called market share. According to a recent poll conducted by the ever-popular developer website SitePoint, the six most popular frameworks account for almost 75% of the available market share, with the remaining twelve polled dividing up the remaining 25% between them. The most popular framework is Laravel, by a relatively wide margin, taking home over 25% of the votes all by its lonesome, followed by Phalcon in a distant second with nearly 17% of the votes. Symfony2 rounds out the top three with almost 11%, followed by a tie between CodeIgniter and Yii for fourth place at 7.6%, and then yet another tie between Aura and CakePHP at roughly 4% apiece.
Looking at these results, you'd probably be inclined towards experimenting with Laravel for your next project, as we all know that the larger the community a framework has, the better the support will be and the more robust the framework will be overall. However, as a new year is also a time for new resolutions, you might want to consider experimenting with more than one framework over the course of your upcoming projects. Obviously, you'll need a couple of projects to really put a framework through its paces, but matching the right framework with the right project can make a huge difference in performance and ease of development. Symfony2, upon which Laravel is based, is often praised for the huge number of features it provides, but is also decried as slow and clunky by its detractors for the same reason.
In order to choose the right framework, you need to know each one of them, and be familiar with the pros and cons of each one - so make 2014 a year of experimentation and expanding your horizons, and you'll soon see that blindly picking one framework and sticking with it can be a time-consuming mistake. Be flexible, and have a happy new year!
Posted on December 24th 2013 at 06:49pm
0 Comments
Saturday 14th December 2013 Symfony Gets Boost from SensioLabs FundingMost PHP programmers are familiar with the value of using frameworks in their coding projects. As a result, there are now quite a number to choose from, but one of the most popular and widespread is the open source PHP framework Symfony. While the project is open source, it was originally developed way back in 2005 by a team led by Fabien Potencier that formed a startup in France last year, SensioLabs. This same firm recently completed a round of financing from venture capital firm CM-CIC Private Capital, to the tune of $7 million USD.
SensioLabs founders Fabien Potencier and Gregory Pascal have announced several upcoming projects, one of the most exciting of which is SensioLabsInsight, which hopes to measure the quality of PHP code within a given application. Originally launched as a beta in October of this year, and still only available to private beta testers, it no doubt helped to secure the round of funding they received. The main goal of the startup, however, is to provide support for developers and companies that implement the Symfony framework in their applications, with the intent of fostering more widespread adoption.
This is an ongoing challenge, of course, as despite the fact that PHP is the most common programming language on the Internet, there are a growing number of detractors who advocate the use of other competing languages such as Python and Ruby on Rails. However, thanks to the widespread success of Symfony, the community that's grown up behind the framework released a more recent updated version in 2011, Symfony2, to even more widespread acceptance.
This level of continued support for the framework should make it even more enticing to companies who are searching for a robust, well-established framework. Yahoo was one of the first major companies to embrace the original Symfony framework, and since then, TOEFL, Virgin Mobile, and the French government (among many others) have all implemented Symfony in some way, and no doubt many more big names will sign on as a result of these events.
Posted on December 14th 2013 at 08:13pm
0 Comments
Thursday 07th November 2013 Do You Really Need a PHP Framework?We've discussed various PHP frameworks in the past here, as they can be incredibly useful tools for developers. Instead of recreating entire libraries of code that already exist, making use of a framework can save you days or even weeks of coding - and if you choose the right one, they offer an incredible amount of stability and security. Numerous popular frameworks have huge communities behind them, constantly monitoring the code base, updating it regularly, and plugging security holes and other issues that would quickly become overwhelming for a single person.
However, because of their very nature, there are also some serious downsides to using a PHP framework. Due to their size and scope, they boast a huge learning curve, and the more complex the framework, the harder it is to get up to speed - it's almost like having to learn a new programming language within PHP. Once you've invested that much time into learning a framework, it can become very difficult to switch to an alternative framework if it turns out that another would be better suited to your next project.
While there is often added stability and security gained by using frameworks, the fact that they are almost ubiquitous means that the frameworks themselves are also a much more appealing target for hackers and other malicious users. If a vulnerability is found in a framework, it means that all sites and applications that use that framework are likely to share the vulnerability.
In order to stay on top of this danger, communities are constantly updating frameworks with new code and patching vulnerabilities, which sounds like an excellent way to handle the problem. However, frameworks inherently work the way other libraries do, which means that they have to be embedded directly into your build or code repository. So while they are being updated to ensure security, you then must turn around and update your own implementation of the framework to ensure it's using the latest version.
The value you'll derive from a framework really depends on how you code and the types of projects you work on. If you're working on smaller scale projects, you will probably end up with your own segments of code that can be recycled for various future projects, much in the same way as a framework operates, but without all the tedious issues and unnecessary features that can make working with a framework a hassle. However, if you're regularly working on large scale projects that require the pinnacle of stability and security, a well-chosen PHP framework can be your new best friend.
Posted on November 07th 2013 at 03:08pm
0 Comments
Tuesday 17th September 2013 Selecting the Right PHP Framework for Beginners
If you spend a great deal of time working with PHP in your development process, it makes sense to consider utilising an established framework for a number of reasons - namely, writing your code faster and more cleanly. However when it comes down to actually choosing a framework, opinions are wildly varied; fans of some frameworks almost reach the point of religious zeal when it comes down to one choice over another. For those of you just starting out with frameworks, this can create an overwhelming and conflicting set of opinions, so let's take a step back and discuss a few basic considerations about what you hope to achieve with your framework.
The primary concern about selecting a framework is to ensure that it has an active community behind it, as that's what creates the strength of a framework. Frameworks let you quickly and easily reuse code for many common functions and situations, letting you focus on the areas of your application that are specific to your situation. As you can guess, this means that the more people use and contribute to a framework, the more robust and useful it will be.
When you build an application using a framework, your code is inherently dependent on the security and stability of the entire framework codebase, so it can be critical to stay on top of any potential exploits or vulnerabilities that are discovered, and an active community can make this much easier.
The next most important consideration is the quality of documentation within the framework. We've all spent many wasted hours trying to understand another programmer's undocumented code, and with a framework the problem can be 10 times worse. Typically, most frameworks have decent documentation, but it's worth exploring to see which documentation you find easiest to understand and work with. What clicks for some coders won't work for others, so be sure to check this out.
Finally, if you're looking for a framework to help you out with a small, single project, you might want to reconsider - frameworks can often add a great deal of complexity (not to mention execution time), which can make them unwieldy for smaller one-off applications. Even still, however, they can offer you some excellent reusable code that might make things simpler, and if you plan on doing a good deal of PHP coding, then learning a framework early on can save you hours of hassle and reinventing the wheel.
Now that you've understood the basic considerations of framework selection, visit Wikipedia's comparison of the various PHP frameworks here and choose one that you're comfortable with. The best framework in the world isn't any use if it you don't enjoy making use of it!
Posted on September 17th 2013 at 02:31pm
0 Comments