This is Episode #4, where I start test-driving the "Lobby", which is where a "host" will create a new game, and where people can join existing games.
After futzing around with the mockup a bit, I take a bit of time to draw an architectural diagram (hexagonal-based) to clarify what code does what. Along the way, I realize I had meant to use Event-Sourcing for persisting the Game, so put everything aside and work on that.
Along the way I talk about test data builders and the difference between Command-Query Separation (CQS) and Command-Query Responsibility Segregation (CQRS). I finish with answering a question about when CRUD turns into Domain Behavior.
----
I'm developing the online version of JitterTed's TDD Game (see https://tdd.cards for the physical game) 100% live in front of viewers.
Tech Stack: Java with Spring Boot, Spring MVC and (eventually HTMX), JUnit testing via TDD, and architected according to Testable (Hexagonal) Architecture principles.
You can find the code on GitHub at: https://github.com/jitterted/tdd-game and look through the commits to see the progress made in the videos.
These videos are from my live coding that you can find on Twitch: https://JitterTed.Stream
You can discuss this on my Discord: https://ted.dev/discord, and find get in touch with me in various ways: https://ted.dev/about
Other episodes in this series: • JitterTed's TDD Game: Online Version