09 December 2017 — Comments
A couple hours ago I have released the seventh major version of a module I created more than 4 years ago.
Just released #AcMailer v7! 🎉— Alejandro Celaya (@acelayaa) 9 de diciembre de 2017
Important improvements, with trully stateless services and support for Zend #Expressive.
Adds support for #PHP 7.2 and drops PHP 5. #ZF3 #modulehttps://t.co/AuFXJhnbra
Blog post soon 😀
It was born as an abstraction to send emails in Zend Framework 2 applications, but trying to make the process simpler than directly working with the lower-level zend/mail component.
I initially created it to use it in my own project, but at some point decided to publish it as a packagist package to ease others to use it.
26 November 2017 — Comments
At some point, any enterprise project will probably need a message queue.
A message queue is used to publish information (usually known as messages) that a different "node" (usually known as worker) will consume in order to perform a specific action.
It is frequently used in web applications to pass information to background workers that consume the queue and perform long tasks, but it is also an important part when applying concepts like Event Sourcing to your architecture.
It is also really important when working with microservices, since it is a way to enable data exchange between each service.
16 October 2017 — Comments
Those topics cover a lot of advanced and complex practices, but today, I want to talk about a simpler subject. What is the best approach to pass data from outer layers of the application (actions, controllers, async jobs, CLI commands...) to services that are part of the use case layer, by taking advantage of some of the practices promoted by those subjects.
16 September 2017 — Comments
Earlier last week I found a github repository which collects different resources related with PhpStorm. Plugins, themes, utilities...
I found it very interesting, because I think PhpStorm is the best PHP IDE by far, and I've been using it on an almost daily basis for the last 4 years.
The thing is that finding that repository gave me the idea of writing a post explaining the list of third party plugins I use and why, in case somebody is starting to use the IDE and wants some ideas on where to start.
If you want to get any of them, just search for it inside PhpStorm. It's the easiest way to install them.
21 July 2017 — Comments
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 slightly different approach.
My choice is zend-servicemanager, it is the one that better suits me.
Other containers rely on auto wiring and auto discovery in order to know which dependencies need to be injected on every service, and I think that leads to errors when an application grows.
I like zend-servicemanager because it is explicit, and you are always in control of what's done, without loosing flexibility in the process.