Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Alejandro Celaya:
My first approach to Zend Expressive
Sep 14, 2015 @ 10:50:40

The team behind the Zend Framework recently released a microframework of sorts that makes use of middleware as its primary location for processing: Zend Expressive. In this post to his site Alejandro Celaya takes a "first approach" to this new framework and shares some of what he's discovered.

One of the trending topics in the PHP world nowadays is the one about microframeworks. It started some years ago with Slim and Silex, but recently it has been an explossion of new microframeworks. First, Slim's team announced the third version of its own framework, which implemented the psr-7 HTTP standard by taking advantage of the middleware concept. [...] Then, Laravel launched the Lumen project, which is another microframework based on Laravel components [and] Zend framework's team launched Zend Expressive, which is similar to Slim 3 in the fact that it works with middleware and psr-7, built on top of zend-stratigility and zend-diactoros.

He starts the post off answering two "why" questions: "why microframeworks" and "why Zend Expressive". He then gets into the technical details, comparing some of the basic route handling across the different microframework projects (with code examples). He shows how Expression allows the use of a service container as the main object instead of just defining routes (and what routers that's compatible with). He briefly covers some of the other piece of the Expression puzzle: template library support, the service container, error management and some other considerations to think about with evaluating the tool.

tagged: zendexpressive expressive microframework introduction overview comparison

Link: http://blog.alejandrocelaya.com/2015/09/12/my-first-approach-to-zend-expressive/