- Considerations when working with async PHP runtimes like swoole
Asynchronous and non-blocking runtimes are pretty usual in many programming languages, as well as long-lived web apps that stay in memory and are capable of dispatching multiple HTTP requests without having to be fully bootstrapped every time. This has not been traditionally the case with PHP apps. …
tag Archive — "dependency-injection"
— 2020 —
— 2019 —
- How to properly handle a doctrine entity manager on an expressive application served with swoole
Some of you probably know that I have a pet project in which I like to work from time to time. This project is a self-hosted URL shortener called Shlink. Shlink is built using expressive as the base framework for the HTTP-dispatching task. A while ago, an expressive module was released to officially…
— 2018 —
- Dependency injection in nodejs projects
Some of you know that I work now as a full stack javascript developer, and I have interacted with a few different projects, both in front-end javascript and in nodejs. My main concern about javascript has been that, apparently, the community has not adopted one of the practices that, for me, has bee…
— 2017 —
- Reusing factories in Zend ServiceManager
I think it is doubtless that modern PHP embraces SOLID principles, and therefore, dependency injection. That's why every modern PHP application needs a dependency injection container to deal with it. There are several options out there, depending on the way you like to work. Every container has a sl…
— 2016 —
- Project Scalability with Zend Expressive
I've been working with some different frameworks lately. One of them is Zend Expressive, and I've come to the conclusion that I don't need to choose between different frameworks; depending on the project, Expressive always fits my needs and scales from small projects to bigger applications. The Micr…
— 2015 —
- Improve dependency injection in PHP apps with Zend Framework plugin managers
I have spoken many times at this blog about dependency injection, and how the ZF2 ServiceManager is one of the best tools to solve it. You can read these related articles to know more: How to properly use the Zend framework 2 service manager as a dependency injection container Advanced usage of Ser…
- Managing objects creation and dependency injection with Zend\ServiceManager
Some time ago I wrote the most successful article of this blog, Advanced usage of ServiceManager in Zend Framework 2, explaining all the ways a service can be created by making use of Zend\ServiceManager, the service container component in Zend Framework 2. On this article I'm going to show a real e…
— 2014 —
- How to properly use the Zend framework 2 service manager as a dependency injection container
The service manager is one of the most important components in Zend Framework 2. It easily allows us to handle object instances, construct them and share them between other objects. By using a simple configuration file, we define how our objects have to be constructed, by a simple new, by using a f…