Skip to Content

Do One Thing and Do it Well: Small Libraries Over Large Frameworks for Flexibility and Longevity

[Web Development]
From huge performance improvements to a seismic shift in how software is built and maintained, 2014 has been a big year of changes and improvements for PHP as a web development platform. The widespread adoption of the package manager Composer signals the end of monolithic frameworks and vendor lock-in.  It has kick-started an explosion of modular libraries, which can be used regardless of whether your website is built on Drupal, Wordpress, Symfony or any other platform. This is a great time for your website to be built with PHP; the move toward small cross-platform components provides many benefits:
  • The pool of high-quality libraries for common functionality like web-based form handling, user login, database access and third party integration (social media, newsletter signup, etc.) makes it faster and easier than ever for developers to add complex functionality to your website.
  • A modular platform allows components to be upgraded individually, allowing ultimate flexibility when new features are added, better options become available, or your requirements change.
  • Standardized package management software makes it easier for developers to find and patch security issues in third party code, keeping your website and your customer data secure.
  • Finding programmers to work on your website becomes easier (regardless of your platform of choice) due to increased code sharing across the community.

Composer: The Bridge across The PHP Community

compose (verb):

1. to make or form by combining things, parts, or elements

2. to end or settle (a quarrel, dispute, etc.)

The introduction of the Composer package manager for PHP at the tail end of 2013, and its continued adoption this year, has been the single most important factor in enabling a sea of change in the coding world: sharing between different communities and libraries. Composer helps you create your application by combining existing components together despite your platform (Symfony, Wordpress, Drupal, Laravel or something else altogether). It gives the PHP community and library authors a standardized way to deploy and upgrade their applications and libraries regardless of their framework. It has also sparked a movement in the community towards the creation of small re-usable libraries that are not tied to a specific CMS or framework.

"Do one thing and do it well"

The above quote is often referred to as the 'UNIX philosophy', named after the UNIX operating system. While many people have never heard of or used the UNIX operating system, its descendants exist in the form of Linux and continue to run an estimated 60-80% of servers on the internet. Creating small components or programs which focus on solving a single problems that can be combined to solve complex problems, is an approach to building software that is both flexible and maintainable. Individual components can be swapped out or upgraded when necessary without having to rewrite the entire system.  A couple of organizations striving to promote collaboration are the PHP Framework Interoperability Group (PHP-FIG) and the League of Extraordinary Packages.  They work to develop libraries and design approaches that can be used in any framework, making it easier to create cross-framework packages.

Vermont Design Works Embraces the Change

Vermont Design Works has been building and launching websites and applications for 15 years, so we are pretty accustomed to the rapid rate of change. In response to this positive shift in the industry, we are unveiling a new major version of ContentWorks, our Content Management System.  ContentWorks 2.0 leverages these improvements in coding and advances in technology to provide a great user experience combined with high functionality and extensibility. We are also making active contributions to the community as part of the Symfony CMF project. You can read more about our open source contributions here or contact us today for a demo of ContentWorks 2.0.

What Does This Mean for My Website or Web Application?

As an owner of a business, with a website or a web-based startup with applications built with PHP, what benefits will this change have for your website?  Projects using reusable components can deliver more value with greater development time focusing on the efficiency of your app or website, instead of re-inventing the wheel for common functionality like user login or form handling.

A Greater Return on your Investment

  • Platforms that standardize on packages can be more easily upgraded, lasting longer and growing with your business.
  • Longer shelf life of websites with the ability for tools and components to be swapped out (more modular) if better options arise.
  • Easier to find developers that can work on your website; you don’t need a Drupal programmer - you need a PHP programmer.
  • Access to increased security, a centralized database of known package security issues makes it easier to identify and fix code security vulnerabilities in your website.
In order to capitalize on the benefits of these changes for your website or web application, the first step is to ensure you are on a platform which is embracing Composer. Most major frameworks and platforms, including VDW's new ContentWorks 2.0 CMS are being upgraded to use Composer. Many CMSes from Drupal and Joomla, to frameworks like Symfony and Laravel, have embraced this change. Wordpress is a notable exception, although there have been some community lead efforts to change that.

Whats Next?

This isn't so much a trend as an irreversible paradigm shift for the PHP platform. Here are some predictions for how this will continue to play out in 2015:
  • The community will continue to draw inspiration from other ecosystems like Ruby and Python to create packages that don't yet exist.
  • Wordpress will add official composer support/instructions.
  • Job advertisements and firms will focus less on advertising for specific frameworks, looking for ‘Modern PHP Developers' instead of 'Wordpress Developers'.
  • Businesses with high functionality web properties that employ package-based solutions will enjoy a competitive advantage over those that don't, as they are able to develop functionality more rapidly and with less overhead.