O'Reilly logo

Mastering Cloud Development using Microsoft Azure by Marco Parenzan, Roberto Freato

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Per-message event handling

After the basket has received the command to add a product in it, the web application will not yet be updated with the new basket information.

In terms of responsibility, it is correct that a command handler does not update the UI. Instead it has the responsibility of notifying that a product was added into the basket, and that the total and the content have changed.

This is an important concept for evolutional software. Events are a great way of decoupling, not only on actual features, but also with future, hypothetical features. If in future there is a need for another feature depending on how the basket updated, then none of the existing code would be affected as just another worker would be necessary to generate another ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required