Kategorier
Uncategorized

Wardley Mapping – resources

Resources ~note, this page will be continuously updated ~

This is a reference page for Information, notes, links to tools and articles recommended for learning and using Wardley Maps

The At WardleMaps now on LEF http://www.wardleymaps.com/ >(https://leadingedgeforum.com/advisory/wardley-mapping/)

A highly recommended section is the research and as an example this one ”A Glimpse of the Post-Corona World; Industry Disruption Gets Real”, a recorded webinar talking about things like ”The need for strategic resiliency”, ”How the tech industry can help” and why external shocks are important (listing 10 of them)

Why Wardley Maps?

As I wrote here in ”why-maps-why-wardley-maps

crossing the Baltic Sea or going around?

a map gives you situational awareness, making you aware of the space you are in. Allowing you to navigate the current situation and be aware of what the future will look like.

How does it work?

There are plenty of other great resources so I’ll just link to some.

A great talk (I was there) is Simons presentation ”Crossing the River by Feeling the Stones” from DDD Europe 2018

Here is the ”Book” by Simon Wardley – you should read it if you want to learn the tool, or to give an overview of what it looks like.

  • first chapter (start here) ”on being lost”
  • second chapter ”finding a path” is perhaps the best to start with if you are just curios of how the map can look , search for ”Figure 8 is what a map of a single line of business should look like”

Kategorier
CQRS event-sourcing Learning software development

Commands and commandHandlers

CQRS and Event sourcing – Resources

When looking at this video walk-through of OAuth Event Modeling in Go by Jamie there was a question about how to handle commands without the need of switches over the command types.

So my reply on that got a little longer and thought I would share the resources I pointed to here (to free the comment from being stuck in youtube)

Great example and walk through Jamie! (and thanks to the rest of you for value provided)

Regarding handling events without the switch, I do not know Go – but in C# you usually register EventHandlers with commands and you will have a dispatcher or similar as a single entry point where the handlers knows what commands they should act on. see examples in referred links below.

So, maybe this is not for Go devs, but you might get some ideas from it, anyhow.. here are some links for c# resources.

SuperSafeBank

”This repository shows how to implement Event Sourcing, CQRS and DDD in .NET Core, using a Bank as example.”

This (C#) repository looks like a great example application ( a little more complexity, I haven’t dived deep into it yet) https://github.com/mizrael/SuperSafeBank

CQRS in Practice (course and code)

Vladimir Khorikov, my go to guy when looking for quality examples, and learning the craft in C#, shares some high quality stuff (pluralsight corses and blog https://enterprisecraftsmanship.com/posts/types-of-cqrs/)

In this repository, https://github.com/vkhorikov/CqrsInPractice/blob/master/After (from the Pluralisght course CQRS in Practice) – you can see an implementation example; I’ll try to flesh out the command and commandhandler stuff for you here.

I like to look at things in the order of ”from entry point in the API”, Hope you can follow my logic =)

Command to Result flow.

API

start in ’Api\Controllers\StudentController.cs’.Register(…)

//called from UI to register student
Register(NewStudentDto dto)
            var command = new RegisterCommand(...); // (Logic\AppServices\RegisterCommand.cs)
            Result result = _messages.Dispatch(command); //finds handler, handles the command and returns the result.

The message Dispatcher

in ’Logic\Utils\Messages.cs’

in ’Messages.Dispatch(command)’ the matching handler for the command is looked up, via DI, and then executed (aka handled).

handler = _provider.GetService(handlerType); // System.IServiceProvider (built in)
result = handler.Handle(command);

The Registration of handlers

Startup.cs

DI, Dependency Injection, is configured in ’API\Startup.cs’ and handlers, for commands and queries; these are registered via services.AddHandlers() – where ’services’ is ’Microsoft.Extensions.DependencyInjection’

HandlerRegistration

’Api\Utils\HandlerRegistration.cs’.AddHandlers()

  • This class takes care of finding, and registering, all handlers of type ICommandHandler and IQueryHandler in the assembly,
  • making them available for use from IServiceProvider.GetService(serviceType)