From 8b38c6b6fffb5534c8c30145967bb862c2ebe2ca Mon Sep 17 00:00:00 2001 From: JasterV <49537445+JasterV@users.noreply.github.com> Date: Thu, 2 Apr 2026 01:07:16 +0200 Subject: [PATCH] wip: hex architecture & ddd in rust --- .../HexagonalArchitectureAndDDDMeetRust.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/content/blog/HexagonalArchitectureAndDDDMeetRust.md diff --git a/src/content/blog/HexagonalArchitectureAndDDDMeetRust.md b/src/content/blog/HexagonalArchitectureAndDDDMeetRust.md new file mode 100644 index 0000000..5cf99d9 --- /dev/null +++ b/src/content/blog/HexagonalArchitectureAndDDDMeetRust.md @@ -0,0 +1,28 @@ +--- +draft: true +title: "Hexagonal Architecture & DDD meet Rust" +description: "Building a Rust application following Hexagonal Architecture and DDD" +pubDate: 2026-06-02 +image: "./assets/elixir.svg" +--- + +For the past years I've been developing web services in Rust. + +In every single one of them, different design patterns were used, some more simple, some more complex. + +That makes sense: You want to find the best tool for the job in every project, and so you come up with the architecture +that best fits the use case of the software you are building. + +After all these years building web services I've found they all have a few characteristics in common that possibly apply to every kind of software: + ++ Someone or something has to interact with your software to use it. (e.g. A network client, a real person, a code library...) ++ You software interacts with the outside world to ask for or send data. ++ Your software needs to be tested (To prevent blowing up production at 3am, we've all been there) ++ Your software will be read and maintained by someone (or an AI, who knows) + +Given these assumptions I would conclude that whatever kind of software you are building, it needs to: + +- Define clear boundaries between what your application wants to achieve and the outside chaotic world. +- Be mostly tested in a unit-test way, simple and free of the burdens of the outside world +- Be understandable by new devs, with clear naming conventions and good documentation +