CQRS
Introduction CQRS, which stands for Command Query Responsibility Segregation, is a new approach in DDD which optimizes a system for writing and reading data respectively by separating these two processes from one another. Modern CQRS-architectures allow for highly scalable systems on both the read- and the write-part of the system. Implementing a CQRS-architecture also has downsides as it is highly likely to increase cost and complexity of the system. So it’s always a thin line to decide whether CQRS can help in the current system or whether it will overcomplicate things with no real benefit....
Domain-centric Architecture
Introduction Domain-centric architecture is an up-and-coming topic when deciding how to structure new applications. A lot of todays applications are centered around a database and not a domain, which is good in some cases but can get rather complex in other cases. As a lot of applications work like a basic CRUD-application, the database at the center usually doesn’t hurt. But even simple CRUD-apps could benefit from putting the domain at the center instead of the database....
Better Code Quality
In this post I’d like to outline some topics, strategies and practices that, in my opinion, help with improving code quality and developing more stable code in the future. Some of these topics are very subjective and I outline my personal opinion here. Test Driven Design (TDD) TDD has the aim to first focus on writing tests that covers the requirement before implementing the requirement itself. This has the big advantage that tests are written against the requirement and not the implementation, reducing the risk of missing certain cases in the requirement because the implementation didn’t cover them in the first place....
Python Package Managers Overview
I’ve used quite a few of the available package managers for python over the years and would like to do a little comparison of 3 of them, showing my pro’s and con’s of each one as well as what makes them unique. PIP pip is the default package manager that you get when you install python onto your system. It is configured to get packages from the Python Package Index, but you can also use it to download packages from your own private repository, which is useful in companies or restricted networks....
Django Advanced Queries
This post will show some more advanced parts of the Django ORM and the queries you can do with it. There are multiple ways to achieve the same query result in Django, but this post will focus on the ways done through the ORM and the python functions. Raw SQL For completeness, I quickly mention the way to execute raw SQL statements. In my opinion, this way should be used as a last resort, if no other way works because you loose a lot of benefits like type conversion and bound checks if you completly skip the ORM and access the database directly....
Convert PlantUML-Files to SVGs in Gitlab CI/CD
PlantUML is a tool that allows you to create UML-diagrams based on text rather than in a visual editor. This has a few advantages like managing your diagrams in a VCS or copy-pasting blocks from one to another diagram. Read a quick introduction here. This post will show you how PlantUML-documents can be converted to SVG-files in a Gitlab-pipeline and be stored in the repository. Using SVGs allows you to embedded them on platforms like Confluence or in a README and it also allows you to use PlantUML-features like embedded links, which won’t work in all cases when you render the diagrams on the fly....
PlantUML Introduction
PlantUML is a tool that allows you to create UML-diagrams based on text rather than in a visual editor. This has a few advantages like managing your diagrams in a VCS or copy-pasting blocks from one to another diagram. This post will show you how you can get started with PlantUML and some basic syntax to draw / write your first diagrams. What you need You need to install Java and Graphviz from here....
Trigger a z/OS JCL-Job from Python through FTP
While working with mainframe systems in todays world, it can make a lot of sense to try and integrate it with other languages or control it from the “outside”. This enabled me to simplify tasks such as automated testing, continous integration and deployment, and a few smaller tasks that would have taken way longer if they were done manually. In this post, I’ll show how I used Python to orchestrate jobs on a z/OS-system through FTP....
Read Temperature on an ESP32 using the HTU21D-sensor
The HTU21D is a popular and affordable sensor for measuring both temperature and humidity with a microcontroller. While there are many libraries for interacting with the sensor in the arduino-ecosystem, at the time of writing this, I didn’t find a good library to support the sensor with ESP-IDF while utilizing FreeRTOS. So here is a little write-up about how I implemented a small custom driver for the HTU21D. First things first: The specification....
Url Decode on a Microcontroller
On a recent IoT-Project I did, when working with the ESP32 and the associated WiFi-Chip, I found myself struggling to correctly decode and interpret the submitted URL, especially the URL-parameters. To make lives easier, I decided to write a quick post about how I decode and interpret URLs on an ESP32 in my projects. First, we’ll define the header file and the API we want to expose: // decode.h #include <string....