2 minutes
👥 /dev/night - a story continues
Prologue
Together with @stesie23 we started a local meetup for developers in Ansbach in August. First I introduced them to “Transaction Patterns”. This hit the interest of some of the attendees. So we thought we should stick to the patterns mostly used in eCommerce.
If you want to read about the first event look over to here: http://stesie.github.io/2016/08/first-dev-night
Getting it going
So @stesie23 took on the second event and presented CQRS/ES (Command Query Responsibility Segregation und Event Sourcing) pattern. This pattern is really useful if you want to keep all flexibility in the future. It allows you to keep track of all events which manipulated data, jump back in time and also make a deep analysis of it. All with a minimal hit in performance because the actual “persistence” and “interpretation” of the data is separated. So you can build different “readers”/“interpreters” for the same dataset. (e.g. front-end and analytics)
Essentially event sourcing is the main pattern which is used in git.
You just track how you got to the result not only the result.
The challenge
As a challenge, we thought of implementing a shopping cart in an “event sourcing”-fashion, but without considering the database too much. Because we thought this might introduce too much complexity.
Learnings
Again we noticed that in about 1 hour to 1 1/2 hours completing the challenge was rather difficult.
I now think you should really do challenges which are extremely small and rather have some extensions up your sleeve if they are done early.
Another thing we learned is, that because some are new to TDD (Test Driven Development) not everyone was doing it. Maybe this also has to do with the time constrained. But this is when we realized that we probably should first set up the basis of the development. Like TDD and Clean Code before we move on.
Fortunately, an attendee took on the task so @sd_alt will tell us what TDD really means and also introduce us to some frameworks/tools which could help us to get going faster. 😄
TL;DR
We learned you really should emphasize the basics before you venture into the depths of software development. Also if you make challenges, make them small and easy to completed and iterate upon them later.