Guide to 24 PHP Frameworks (Part 3)
We continue our series on PHP frameworks by looking into several interesting options, such as Li3, Nette, Phalcon, and Pop PHP.
Join the DZone community and get the full member experience.
Join For Freethis blog post is the third part of "the definitive guide to your next php framework" series.
didn't read it yet?
to have a complete understanding of this topic have a look at introduction to php frameworks and guide to php frameworks, part 2 .
table of contents
li3
as we have seen in our previous articles, several frameworks are refactoring versions or new projects heavily based on other php frameworks.
li3 is no different.
it was born in october 2009, under the name cake3, from the idea of garrett woodworth and nate abele, project manager, and developer of cakephp.
built for php 5.3+, li3 claims to be one of the first frameworks to bring groundbreaking technologies web developers.
this project has managed to gain several important sponsorships like engine yard (paas based in san francisco), ratify, and atelier disko.
among its more relevant technologies, i have to mention its api, which was maybe the first api to include support for relational and non-relational databases together, and its class structure.
the structure of the class allows you to organize your project or replace and override the built-in classes in a very easy way. its use of closures and anonymous functions also allows the developer to bind method calls.
li3 includes mysql, mongodb, couchdb, and redis, with support for cassandra and elasticsearch as well as php activerecords and doctrine 2.
when i asked nate abele, founder, and ceo of radify, (a tech company that builds automated software and chief developer of li₃) what he thinks about the framework and how to choose the best framework, he gave me a very funny quote:
"that’s like asking what’s the best food. different frameworks are for different types of apps and different ways of thinking about problems. there’s certainly some overlap, but i don’t think one could argue that a single one out of all of them is best."
li3 is, without a doubt, a good framework. it seems to have a quite a big community around it, but, as with other frameworks, you need to step into it and see if you like it from your own experience.
nette framework
created by david grudi and then further developed by a big team, nette is not considered a framework, but a combination of different services.
it includes:
-
latte, a high-tech template language, definitely beats smarty/twig.
-
di, a proprietary dependency container.
-
tester, a php unit testing suite.
-
tracy, a debugging tool and.
-
dependency injection, a php container for services and, of course, the open-source framework.
the framework itself is also divided into small packages, you can find:
-
nette/application
-
nette/di
-
nette/mail
-
nette/utils
each package has its own release cycle and it's released when needed.
with these packages, you can build nearly everything: apis, personal sites, medium projects, etc.
nette itself is a great framework for building anything because it has a really cool architecture. you can switch every part of its system to a different one. for example, with a db, you can easily use doctrine or there is an active record layer called nette database.
if you would like to create an api on psr-7, you can! the team developed a lot of projects on psr-7, even if nette is not psr-7 compatible.
it is an mvc framework that supports php 5 and php 7.
making use of the dry (don’t repeat yourself) and kiss (keep it simple, stupid) programming principles, its core feature is an easy-to-use and fast php framework.
nette has a bsd license, which imposes minimal restrictions and increases the opportunity for developers to improve the quality of the code within their app.
the nette framework (i mean all the packages taken together,) is currently in 2.4 mainline. previous versions are: 2.3; 2.2l; 2.1; 2.0. at the moment, the team is preparing nette 3.0 with full php 7.1 support. but, as said, all nette packages are php 7.2 compatible.
unfortunately, even with the presence of very good docs, there isn’t a lot to say about this framework.
but it is clear that the team behind it is trying to increase the quality of the product and its ecosystem. its open-source license is helping a lot with that.
i had the opportunity to chat with two of the most prominent people within the nette community: tomáš votruba and milan šulc.
just looking at the impressive number of contributions they had on the github projects you will understand that you are talking with people that know their stuff.
due to the limited amount of new features released for nette in the last two years, tomáš is spending most of his time working on symfony and writing for his blog.
an amazing post he wanted to share with us regarding this topic is a comparison among his preferred 3 frameworks:
milan’s main goal is to improve the documentation, which is written in both czech and english.
his contributions to this section were huge.
he highlighted the growth that the nette community is having, especially in the czech republic where the team organizes a meet up on a monthly basis called posobota, and once a year they gather on a summer “nettecamp” in which they code and get to know each other.
phalcon
phalcon’s first and most important purpose is speed.
andres gutierrez, the developer started this project by taking a completely different path from the others.
in fact, phalcon php is a web server extension and is written with lower-level programming languages, like c and zephir, which provides us the ability to develop in a higher level language and compiled the code into php.
this process simplifies development, reducing coding time.
phalcon php's beta version (called spark), was released in 2011.
the first version released november 2012.
in this release, there was a very fast orm, cache element, and its fundamental code followed the mvc pattern.
with the following version, other features were announced, such us phql, which is a dialect of mysql, that speeds up the queries and requests to the database, and vol, a template engine.
the first version of phalcon that supported lts is the 3.0.0 that inter alia supported php 7.
a remarkable side project that arrived from the phalcon team is phalcon slayer, a wrapper that reconstructs the framework supporting composer.
as declared by the team and emphasized in the official website, this framework is focused on velocity and, as result, it is one of the fastest, if not the fastest, php frameworks.
pop php
nick sagona is a new orleans, la lead developer that came up with the idea of refactoring several old php libraries and putting them together in an open-source project.
the first version of pop php was released march 19, 2012.
the focal point of his effort was to merge these libraries into an mvc set of components in order to create a web application in an easy way.
the second version, not supported anymore but still available, was released in july 2015 and developed to take advantage of php 5.4 and the use of composer.
version 3 released one year later had some updates from the previous version and was written to support the new features implemented in and php 5.6 and, later, php 7.
the last version now available from the official website and github is 3.6.5.
this is a very good product, it was counted several times among the best php framework and it currently includes most of the features accessible by much bigger frameworks. these include:
-
routing
-
service locators
-
event managers
-
form generators
-
automated emails
-
a pdf generator
-
caching
-
debugging
-
logging
and i need to add popcorn, a rest-based microframework for deploying quick web applications, to this list.
nick was so kind to answer my questions about pop php. what he said was that the project started with a small library of components that he wrote to handle the website and apps he was developing back then.
and it grew pretty quickly from there, based on expanded needs as well as keeping tabs on trends and standards in the industry.
he surely has put a lot of personal time into it, but he added that he would love if he could have more time to market or promote this framework a little bit more.
prado
sometimes, projects start on the wrong foot and there is very little that you can do. prado seems to be one of them. this project was first started by qiang xue, a chinese software engineer with plenty of experience in open source software. this framework came to be realized by taking asp.net and delphi as inspirations.
the first release of this product was released in june 2004 and it was written in php 4. for this reason, the quality of this version was very restricted and had some issues.
qiang refactored it using the more modern php 5 and, with the new version, he was able to win the zend php coding contest in 2004, gaining votes from a public and judges panel.
in may 2005, the team of developers decided to rewrite the framework from scratch, again, to fix a few problems found in the second version.
from version 3 on, this project became much more stable, its code was moved to google code, and then github, and this moving resulted in more contributors being able to fix the problems, thus a better product.
in october 2008, the development team released yii, a php framework that succeeds prado leaving the concept of page/events and focuses on an mvc design pattern.
nowadays, a good amount of people are still supplying help and develop new features even though the majority of the work is now focused on yii which i will describe in the next post.
silex
fabien potencier is the creator of symfony, one of the best and most popular php frameworks in this list.
but he also created silex, and first released it in the last quarter of 2010. it is now at version 2.0.
silex is a microframework heavily based on symfony. it is mainly used to create small web applications and rest apis.
silex is available in two different types:
-
slim, which has only a basic routing engine, a built-in security function, sessions, cookies handlers, and some other minor features, but is extremely fast and ready-to-go.
-
the second version is called fat, and as the name suggests, but it is the more packed version of the two. it includes twig, a template engine, doctrine (a database abstraction), and other features taken from the mother framework, symfony.
at the moment, silex is viewed as one of the best and fastest microframeworks, as several benchmark comparisons demonstrated over the past few years.
if you need to build a very small application or an api, spending some time learning silex is a wise choice.
the final result will be excellent and you will get to know the basics of symfony, which is good if you want to scale up your application.
silverstripe
here is another item that belongs to the cms category, an open source software under the bsd license. silverstripe is a very good cms that can be used and edited as a proper framework.
the software was first developed almost 20 years ago by silverstripe limited, a web company initially based in new zealand and australia.
the development of the second version that leverages some of the new characteristics of php 5 was started in late 2005 and eventually released on february 3, 2007.
a huge milestone was hit in 2010 when the software was downloaded 250,000 times.
silverstripe 3.0 and 3.1 were released in june 2012 and october 2013 and now supporting api usability, composer, yaml, and an improved uploader feature.
a big difference from other cmss is the clear separation between the authors that are in charge of creating content and the developers/designers that have to change the structure of the website.
this highlighted separation gives an easy-to-use interface to the authors and provides more flexibility to web developers at the same time.
it is a good piece of software, developed in php 5.3, using object-oriented design principles. it follows the mvc pattern and object-relational mappers as well.
among its features, you can see a bespoke version of tinymce, seo friendly url, support for utf-8, and internationalization as well as hundreds of modules, widgets, and themes that can be used to extend the core of the application.
throughout the years, it has earned trust, thanks to the good quality of its code and the several prices they have won.
Published at DZone with permission of Nico Anastasio. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments