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.