(this post was imported from Medium)
In the last days, I have been studying a book that sparkled the beginner's excitement in me — a feeling that was a long time gone. The book is called Domain Modeling Made Functional, written by Scott Wlaschin, and is about using a functional language to design software following the principles from Domain-Driven Design (DDD).
DDD and F# made me realize that there's still so much that can be done to improve the quality and reliability of software that we write.
A nice quote from Domain Modeling Made Functional about DDD:
"If you think of software development as a pipeline with an input (requirements) and an output (the final deliverable), then the "garbage in, garbage out" rule applies. If the input is bad (unclear requirements or bad design), then no amount of coding can create a good output.
(…) we'll look at how to minimize the "garbage in" part by using a design approach focused on clear communication and shared domain knowledge: domain-driven design, or DDD.
Since I know that the best way to learn is to practice what I'm studying, I challenged myself to write an online version of a simple but very nice card game that I play with my friends.
The game is called Dutch Blitz and I see it as a "multi-player solitaire". It's important to notice that this is a study project and I don't intend to make any money with this game.
In order to register my progress, I decided to write a series of posts about the theme.
What are the technologies that I want to learn in order to build an online version of this game?
- F# in the server
- Elm in the client
- Websockets
- Azure to deploy the code (because I'll use F#)
- Whatever else I need to build multiplayer games (I’ll edit this section as I learn what these things are)
The initial goals for this game are:
- [ ] Have a pure (no side-effects) functioning engine tested with TDD. I'll use DDD to model the domain.
- [ ] Have a functioning real-time multi-player state handler
- [ ] A simple, four-player, UI
- [ ] other stuff that I'll write as soon as I figure more things out
I won't spend a lot of time thinking about the architecture in the first moment. I'll think about it only after I have modeled the game domain.
Since I'm a beginner, I expect to make wrong assumptions about the domain and to use DDD/F# in the wrong ways many times as I learn and make progress. But it's ok! Learning involves making mistakes.
Every Monday I'll release new posts. Stay tuned :)
Top comments (1)
Sounds interesting, I started to write my own klondike solitaire game, but without design patterns in mind. Just pure js code, and looking for resources. In the end. I chose not to use open-source playing cards in my klondike solitaire game (and how you can).