The command dispatcher pattern serves to decouple the implementation of a command from its commander. The commander doesn't need to know how the execution of the command is implemented, only that the command exists.
This pattern is particularly helpful to remove input concerns from the application business. Whether the input is an HTTP request, a […]
Most of the requests received by our services are queries, and most of these queries are the same. For each request we need to query the database and transform the data for presentation, a lot of work which could be avoided by caching the response. If you developed your service with something resembling CQS, […]
The olvlvl/delayed-event-dispatcher package provides an event dispatcher that delays event dispatching to a later time in the application life.
A delayed event dispatcher is useful to reduce the response time of your HTTP application when events can perfectly be dispatched after the response has been sent. For instance, updating an entity that would require clearing […]
After I extracted queries for active menus it was time to decorate them with a cache layer that would speed up indexing batches of recipes. Alas, comparing metrics I quickly realized that something was going wrong […]
As your application grows, the methods of your repositories start to accumulate. The more methods, the harder it gets to decorate them with additional features. Looking at these methods you might find topics that will help you extract sets of them into cute queries. It's easier to decorate a class with three methods to add a caching layer, than a whole repository. It will also help in making your application more maintainable […]
A long awaited feature has finally landed in symfony/console 3.4.x-dev: the ability to lazy load commands. There's an article about it on Symfony's blog, but it does not explain how to setup everything. It's not very complex so here we go!
I assume you're using symfony/dependency-injection. If not, you need to create […]
A lot has changed since I introduced modules in WdCore, the ancestor of ICanBoogie. Their initial implementation was inspired by their counterpart in Drupal 5, at a time where you would manually install the components of your application. With the advent of Composer and modern application deployment process, the ability to disable modules […]
icanboogie/message-bus provides a very simple message bus that can handle messages right away or push them in a queue. Implemented with a functional approach, it tries to be as flexible as possible: the message handler provider and the message pusher are defined with simple callables that you can implement with your favorite resolver and your […]
Although I really enjoy the concept of bindings implemented in ICanBoogie, I recognize it can be challenging when your application has thousands of dependencies. Also, as I'm implementing a message bus for ICanBoogie, I recognize the value of a dependency injection container to instantiate all the lovely message handlers, and because I really […]
This afternoon, I was reviewing a colleague's PR and commented that his
RecipesCollection should be
RecipeCollection because "a collection of records" is "a record collection". Surprisingly, I
never questioned similar classes, such as repositories, in our application. For instance, we have a
CuisinesRepository, which was fine by me a few days back while […]
I just released ICanBoogie/CLDR v1.8 with support for units, another part of number formatting. Quantities of units such as years, months, days, hours, minutes and seconds can be formatted— for example, in English, "1 day" or "3 days" […]
I just released ICanBoogie/CLDR v1.7 with support for plurals. A lot of work to find what pluralization rules a language use, or what pluralization rule should be applied to format a number. You see, depending on the language the rules may vary, some languages such English or French pluralize anything that is not
In my ever lasting quest to improve the response time of Icybee, I introduced a new markup that, with very little effort, caches rendered template fragments […]
After three years of relative quietness, I'm about to release v2.0 of my error collector package ICanBoogie/Errors; because after working on my validation package ICanBoogie/Validate, and trying my best to implement it in Brickrouge in the most uncoupled way possible, it was clear to me that the decisions I made regarding error instances […]
So far, the revision v2.7 of ICanBoogie/HTTP comes with the
following changes: safe and idempotent requests are supported with the
properties; the request context now implements
returns flatten and/or normalized request parameters […]
When strings are used as array keys there is no difference between the key used to define the
identifier of a route and that of a record. It may become quite troublesome when you need to search
for common keys such as
title; for instance when you need to […]
Similar to interfaces, this feature allows classes to leave open implementation specifics. And since attributes (their getter) can be used to lazy load a resource, it also […]
It started as an exercise to try out the features implemented in ICanBoogie v3.0, without the comfort of Icybee. Something that would allow me to discover areas of improvement by trying different approaches and test limits.
The blog is built on the controller/model/view/render foundation. Articles are available as Markdown files. They are converted into […]