WordPress: how to handle page redirects in shortcodes

WordPress: how to handle page redirects in shortcodes

This is just a quick tip, something that I faced a while ago while working on a client’s website. I had to develop a shortcode responsible to render a form and obviously after the submission I wanted to redirect the user to another url (following the POST/redirect/GET pattern). It may...

3 minute read
How to handle string localization with AngularJS and Typescript

How to handle string localization with AngularJS and Typescript

As many of you may already know, most of the times we developers write something is because we feel the need to create. Not because the current project really requires it, but just because we feel the urge to write some code, patch something up. Especially when the project is...

1 minute read
CQRS: on Commands and Validation – part 2: the base handler

CQRS: on Commands and Validation – part 2: the base handler

Last time we discussed how to use the Decorator pattern to validate our Commands. The approach works fine but while using it I started feeling something strange. It can be probably considered an elegant solution but there’s something missing, like a code smell. What is the problem? Easy: how can...

1 minute read
CQRS: on Commands and Validation – part 1: introduction

CQRS: on Commands and Validation – part 1: introduction

Let’s have a quick discussion about CQRS. There’s a lot to say to be honest, so let’s try to focus on just one thing today: validating your Commands (who knows, I could start a series after this, we’ll see). The idea is simple: how can I make sure that the...

2 minute read