Skip to main content

PSR-7

Building Modular Applications With PSR-7

·1152 words·6 mins
PSR-7, the HTTP message interfaces opened a new door of creating modular applications. Sadly many of the PSR-7 implementations added many helper methods. So if someone is creating a library that needs a PSR-7 implementations they tie the particular library with the PSR-7 implementation and use these convinient helper methods. So was PSR-15: interfaces for HTTP Middleware and PSR-17: interfaces for HTTP Factories was proposed. When creating a module one of the most challenging part is how to serve the javascript, css and images. We are going to use hkt/psr7-asset which is a fork of Aura.Asset_Bundle . What you want to do is only map the path to the assets folder.

Conduit: Middleware for PHP

·618 words·3 mins
Long back, I happened to talk with Beau Simensen about stackphp on #auraphp channel. It was hard for me to digest when I noticed it need symfony/http-kernel and its dependencies. After a few months, I started to like the middleware approach of slim framework and wanted to push it to aura. But nothing happened there. Conduit to rescue # Conduit is a Middleware for PHP built by Matthew Weier O’Phinney lead of Zend framework. Conduit supports the current PSR-7 proposal. I believe like the many PSR’s, PSR-7 will be a revolution in the PHP world. Conduit is really a micro framework and can grow with your project.