Open source PHP projects of 2011
Open source PHP projects of 2011
Join the DZone community and get the full member experience.Join For Free
Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.
This non-scientific analysis of the popular and exciting PHP projects starts from researches on active projects on SourceForge and GitHub; the latter is where most of the collaboration and involvement of PHP developers is today. I've also crowdsourced the question on Twitter to catch projects I wasn't aware of, and I hope to do the same with you.
The list includes both very popular projects, which are becoming the standard for certain fields of PHP programming, and newest very promising ones. It's not a ranking.
Symfony 2 and Symfony2 Components
Symfony 2 is a production-ready, full stack HTTP framework: it's oriented to satisfy HTTP requests in any way required, more than to a strict MVC approach. It provides a Bundle API for defining modules that you can port between applications. In the world of custom applications, everyone has been talking about Symfony 2 this year.
Moreover, Symfony 2 features 21 decoupled components, each reusable as a standalone library. I'd argue that some of them should be in the PHP core, but in the mean time you can drop in a standard autoloader or a Dependency Injection container with a simpler Git submodule.
Doctrine and the NoSQL mappers
Doctrine 2 is now a mature ORM, able to make you work with the abstraction of an in-memory object graph and to persist it in a database transparently. The good news is that more and more Data Mappers are appearing that target not just relational databases, but NoSQL ones:
- if you want a document-oriented solution with embedded map/reduce, try CouchDB.
- If you want to make declarative queries, try MongoDB.
- if you want to organize your data in a graph, try OrientDB.
HipHop Virtual Machine
Initially HipHop was open sourced by Facebook as an independent runtime environment which compiled PHP applications to C and then to a single executable. The use case for the compiler was that of CPU-bound applications, which have already optimized any input and output channel.
Recently, Facebook also released hhvm, an interpreter that dynamically translates PHP to machine code (JIT compilation). The result is an environment that shares part of its implementation with the original HipHop (that targets production), but can be used during development while source files are edited continuously.
In my researches in the e-learning field, one tool steps up as omnipresent: Moodle, a web-based PHP Learning Management System whose features include management of school courses, enrollments, student progress and didactic content.
Moodle is the Wordpress of schools: a staple software that can be downloaded and played with for free, and that provides a platform for 3rd party plugins. I've seen it used even in Italian schools, which aren't the most advanced institutions in Europe.
Composer and Packagist
There is a lot of open source PHP code, even with a very liberal license that isn't reused due to the difficulty of pulling it in a new project; it's not always the case the benefits of the library outweigh the hassle of installing and maintaining up to date. Package management systems try to mitigate this difficulty.
Composer (and its default repository manager Packagist) is a young project that tries to provide packages and depenedency management on a per-project basis: it's different from PEAR, which install system-wide packages, and more similar to Maven (but less invasive).
The vision of Composer goes farther than managing libraries: it provides an easy way to promote the PSR-0 standard for autoloading, and for distributing common interfaces which are not in the PHP core. Each new standard API introduced in userland could be one command away from your project.
Drupal, Joomla, Wordpress
Content Management System aren't famous for their clean code, but for the whole set of use cases where they get a simple job done: displaying and editing dynamic content on the web without rewriting PHP code at any update; in the case of Wordpress, to quickly allow a user to build a blog. The web is full of success stories regarding old-style CMS.
These tools are even moving to OOP, each at its own pace given the amount of PHP 4 code that they were written in. Joomla ships all libraries as a group of classes, while Drupal features a lots of test cases as classes, plus some dozens in the various modules; even some Symfony2 components will be in Drupal 8.
Most importantly, these tools created a linked industry where more and more people can work on web sites and applications: template designers, community managers, copywriters, hosters. As software engineers, we don't even want to work all day on customizing CMS instances: but there is a large market for these services where custom applications would be a waste of resources.
Opinions expressed by DZone contributors are their own.