The following blog series addresses the Mezzio (formerly known as Expressive) microframework belonging to the Laminas Framework (formerly known as the Zend Framework) and its core concept. The Laminas Framework is for its own is relatively new, but since it is an entire fork and a continuation of the Zend Framework, it has very deep roots in the enterprise software development with PHP.
The series should become as a summary and foretaste for my upcoming ebook to the same topic: using the Mezzio microframework to create effective, leightweight and modern microservices with PHP.
If you want to get notified once the ebook is ready, you can simply register using the following form:
The Background of the Laminas Framework
Even Laminas as a project – compared to other frameworks – is relatively new, it has a solid and proven history. As a fork of Zend, the framework was first released in 2006 and is used in several enterprise applications. In other words, Laminas brings many years of development, stability and enterprise suitability with it. Tested and proven by real life applications, Laminas provides solutions for almost every problem, following strictly the Model-View-Controller (MVC) pattern.
The MVC framework is highly conﬁgurable and requires knowledge about project setup, structure and architecture. A lot of decisions have to be made in upfront as many default concepts set up are broad and general. This means that developers need to have some experience with the framework in order to use MVC optimally.
Laminas Mezzio on the other hand, is quite the opposite of MVC in terms of structure and architecture. I t is an easy to use, PSR-15, PSR-11, PSR-7 compliant middleware atomic micro framework and works nearly out of the box, with just a few conﬁgurations.
Mezzio and MVC are both part of the Laminas Framework. Both are cloned from the Zend Framework and where formerly known as Zend MVC and Zend Expressive. Throughout this blog series, I will always refer to Laminas when talking about “MVC” or “Mezzio”. If it should be specifically about Zend, I will explicitly state that.
The Linux Foundation and the Laminas Framework
The Zend Framework was owned by a private company which offered enterprise services related to the framework. In 2019, the company decided to hand over the project to the Linux Foundation so that it would no longer have to bear the (financial) responsibility and project management.
Unusual for this was the choice of the Linux Foundation as the supervising organization, which until now has tended to serve as the home of collaboration projects from different companies. The underlying strategy is to have and grow a community which eventually takes over and drives the project further.
Mezzio in the Laminas Framework: A Placement in Context
Mezzio uses and builds upon standardized components such as PSR-7 and PSR-15. The PSR standards are defined and published by the “PHP Framework Interop Group” (PHP-FIG),which is a consortium of PHP frameworks (like CakePHP, Symfony, Flow, and the Laminas Framework) and projects (such as Composer, Drupal, Joomla!, Magento, and SugarCRM) with the goal to standardize the PHP world.
Laminas Mezzio forms the basis for complex middleware applications. Middleware pipelines can be described as sequences where individual middleware components act between a client’s request to a server and the server’s response to that client. Ideally, this concept encourages processing through several middleware components in a sequence. These components can alter request and response objects and handle various tasks like routing or authentication, promoting strong modularization in projects.
Laminas – formerly known as Zend – is an enterprise proven framework for web development. The microframework Mezzio – formerly Expressive – enables modern microservice development with a solid and experienced foundation (with Laminas MVC).
With the Laminas Mezzio Series, I want to address the most important aspects of the Mezzio middleware framework. My primary goal is to have a solid reference for Mezzio related concepts and questions. This series serves as a condensed synopsis of the content that will be thoroughly explored in my upcoming Laminas/Mezzio Framework ebook. Stay tuned for a journey that promises to be both enlightening and enriching for developers, seasoned and novice alike.
My name is Dogan, I am a senior software engineer with 10+ years of experience of software engineering in different domains and provide my professional services as a freelancer. I shared parts of my former experience with Laminas here. If you need help with your PHP and/or Laminas projects, do not hesitate to get in touch with me. I am looking forward! 🙂