<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Angelo Hulshout 🇮🇹 🇳🇱</title>
    <description>The latest articles on DEV Community by Angelo Hulshout 🇮🇹 🇳🇱 (@delphinocons).</description>
    <link>https://dev.to/delphinocons</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F374958%2F460e0556-c2f3-49d7-8aa2-99415eb3b96a.png</url>
      <title>DEV Community: Angelo Hulshout 🇮🇹 🇳🇱</title>
      <link>https://dev.to/delphinocons</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/delphinocons"/>
    <language>en</language>
    <item>
      <title>The Closed Loop</title>
      <dc:creator>Angelo Hulshout 🇮🇹 🇳🇱</dc:creator>
      <pubDate>Mon, 28 Dec 2020 23:12:46 +0000</pubDate>
      <link>https://dev.to/delphinocons/the-closed-loop-4hnc</link>
      <guid>https://dev.to/delphinocons/the-closed-loop-4hnc</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--79_iQoJB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2A0Rlb9pV2Vx7YfEs3FlEPRQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--79_iQoJB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2A0Rlb9pV2Vx7YfEs3FlEPRQ.jpeg" alt="Photo by Lars Kienle on Unsplash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In software engineering, and specifically in software architecture, we spend a lot of time talking about patterns, architectural styles and other rules and guidelines. Over the past 25 years, and before, a lot of books and articles have been written about those, covering all aspects of software engineering. All of this is very useful, but it can also be overwhelming and sometimes appear quite complex. That's why every once in a while, I enjoy going back to very basic principles. Basic, as in simple, effective, and often so obvious that they often get overlooked.&lt;br&gt;
Recently, during discussions of the sofware architecture for a new project, I came across one of these principles again. One that is so obvious, and yet so often overlooked in software design: the closed loop.&lt;/p&gt;

&lt;p&gt;The closed loop is a principle that is very common in in electrical engineering, and specifically in control systems. In such systems an actuator, e.g. a motor, is given an input signal. That is supposed to trigger a certain action that results in an output signal. Part of that output signal is fed back to the component that generated the input signal, to ensure the system is behaving as expected.&lt;br&gt;
Depending on the type of actuator, it may be needed to add a sensor to detect the action and provide the output and thus also the feedback signal, but the principle stays the same. In the case of the motor that starts moving on an input signal, the feedback could for example come from a motion sensor that detects movement on whatever the motor is supposed to drive.&lt;br&gt;
In software, and cerainly in larger systems, I see the results of the lack of such closed loops. All to often we trigger an action, set something in motion and never check the result. This leads to unexpected behaviour - not just in control applications, but also in web applications, or even (the tax agency will love this) in book keeping software. This, while all it takes is following one simple rule in design and implementaition:&lt;br&gt;
Close the loop: trigger an action, and verify whether it is executed correctly.&lt;/p&gt;

&lt;p&gt;Some very simple examples from different application domains:&lt;br&gt;
Signal the start of a motor: verify it is moving by checking the output of a motion sensor or cycle counter&lt;br&gt;
Trigger a database transaction: check the result of the commit (Yes, I know it's obvious, so why do so many applications skip this check?!)&lt;br&gt;
Stop a process: verify it is no longer running after a specified timeout (even Microsoft Teams forgets to do this - just try switching between accounts a few time)&lt;br&gt;
Send a message on a message queue: check the result of the queueing function, and design your protocol to return an ACKnowledge message to be returned&lt;/p&gt;

&lt;p&gt;It's basic, it's simple and feels like an open door, but as said, I keep running into violations of this very basic principle. The excuse is often: yes, but we tested every possible situation. That's wrong - no manual test, nor any automated (unit) test framework will ever cover every situation until the day the software becomes end of life. Don't fool yourself!&lt;br&gt;
And now I'm curious to who shares this experience. Would you care to have a look at your own last project and let me know in the comments if you are convinced that you closed every loop?&lt;/p&gt;

</description>
      <category>software</category>
      <category>programming</category>
      <category>exceptions</category>
      <category>reliability</category>
    </item>
    <item>
      <title>Domain Driven Design - method and process agnostic</title>
      <dc:creator>Angelo Hulshout 🇮🇹 🇳🇱</dc:creator>
      <pubDate>Thu, 14 May 2020 12:59:14 +0000</pubDate>
      <link>https://dev.to/delphinocons/domain-driven-design-yet-another-description-lhd</link>
      <guid>https://dev.to/delphinocons/domain-driven-design-yet-another-description-lhd</guid>
      <description>&lt;p&gt;This is the second article in a series that covers the contents of a training I developed (and taught) for over 7 years now. The training covers software design, using the Domain Driven Design approach as it’s basis.&lt;/p&gt;

&lt;h2&gt;
  
  
  On processes, methods and methodologies
&lt;/h2&gt;

&lt;p&gt;As every experienced software professional knows, every organisation, be it a multi national, a startup, a small business, or even an open source project, has its own way of working. Often you find a mix of methodologies and best practises that has developed over time into something specific for the organisation. &lt;/p&gt;

&lt;p&gt;What those exact mixes are is beyond the scope of this article, but let's say that in most organisations you find a bits of waterfall, agile or iterative processes, mixed with functional or object oriented design, some form of requirements engineering and bits of various testing methodologies. The exact combination is beyond this article (and different in every case) but I have to address it. It was one of the reasons I first got in touch with Domain Driven Design, DDD for short. When I was asked by a customer if I could set up a training for software designers, I was confronted with the question which design method to follow. All candidates for the training were working on projects for different companies, on secondment basis. The implicaiton of that was that, although my customer would love ot promote a specific design approach, the course participants would be stuck to the way of working of the project and organisation they were working for. &lt;/p&gt;

&lt;p&gt;In disussions with a fellow trainer working at my customer, we concluded that the work a software designer needs to do, and the deliverables coming out of it, should not be dictated by this company specific approach. Instead, they should always be more or less the same, even if not all steps would be executed always in the same order - i.e. in a waterfall or in iterations. the work and deliverables in the end should be roughly the same. That's why, after a short research into existing approaches to software development, we settled on Domain Driven Design. DDD covers every element that we consider important for making a software design, in terms of activities, deliverables and patterns, and it can be fit in with any development process, no matter how modern or archaic.&lt;/p&gt;

&lt;p&gt;What these are? It's a short list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problem analysis - identifying stakeholders, system context and requirements&lt;/li&gt;
&lt;li&gt;Creating models - of the problem and solution space&lt;/li&gt;
&lt;li&gt;Creating the design itself&lt;/li&gt;
&lt;li&gt;Combining specific problems with generic solutions - technology choices, design patterns, re-use etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The web site DDDCommunity.org summarized it in a way that made it easy for us to select DDD - it literally said at that time (in 2012):&lt;/p&gt;

&lt;p&gt;__"The premise of Domain Driven Design is twofold:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;for most software projects, the primary focus should be on the domain and domain logic, and

&lt;ul&gt;
&lt;li&gt;complex domain designs should be based on a model&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Domain Driven Design is not a technology nor a methodology, it is a way of thinking and a set of priorities, aimed at accelerating software projects that have to deal with complicated domains."__&lt;/p&gt;

&lt;h2&gt;
  
  
  So what are these domains DDD talks about?
&lt;/h2&gt;

&lt;p&gt;Domain is a word with two meanings when talking about software development using DDD, as far as I'm concerned. It can either mean problem domain or solution domain. If you do things the right way, the two almost become one in the end, as we'll see later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problem domain: the organisation, process, environment in which the software is going to be &lt;strong&gt;used&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Solution domain: the organisation, process, environment in wich the software is going to be &lt;strong&gt;created&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When we start a project, the funny thing here is that, as software engineers, we know a lot about the solution domain, but often far less about the problem domain. &lt;br&gt;
Let me use myself as an example. in over 25 years in software engineering I learned over 15 programmming languages, countless frameworks and design patterns, and many different technologies relatd to software development. At the same time, when I started working on a project (that is now about to end) 3.5 years ago for setting up the software to control a petfood factory, I knew close to nothing about petfood manufacturing. &lt;/p&gt;

&lt;p&gt;That changed a lot over the past 3.5 years, thanks in part to DDD. We used ideas from DDD (remember it's a way of thinking and not a methodoloy?) to clarify terminology, to set up functional descriptions, do design work, and now I not only know how the software works, but I can also explain how we get from raw chicken, cranberries, bone meal and barley to your dogs favourite food.&lt;/p&gt;

&lt;p&gt;So what is so magical about DDD here? Well, plain and simple it comes down to is this. At the core of Domain Driven Design is a &lt;em&gt;model&lt;/em&gt; - the &lt;em&gt;domain model&lt;/em&gt;. It is a model of the problem domain, expressed in whatever notation you want. I use a derivative of UML often, but text or blocks-and-lines are equally possible. This model, and that's where the dark magic happens, is defined in such a way that eventually, you can implement it in code. So that means, your problem domain &lt;em&gt;model&lt;/em&gt; becomes part of the software solution.&lt;/p&gt;

&lt;p&gt;At the same time, working on the model, which in DDD is something you should do together with your customer as much as possible, builds up a common understanding of the problem, and later on the solution, with anyone involved. That means, you understand the problem customer and user are dealing with, and they understand your solution. Not that they can write software, but it is clear to them what you are creating and why - even in the externally invisible parts.&lt;/p&gt;

&lt;p&gt;And to top it of, the terminology used in the model becomse a shared language between customers and engineer. When a customer or a user wants a change, he can express that in terms of the model, and similarly an engineer can explain a change being made using the same. This is what DDD refers to as the &lt;em&gt;Ubiquitous Language&lt;/em&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example of what it looks like
&lt;/h1&gt;

&lt;p&gt;The diagram below shows something from a first talk I had with the customer of the petfood factory 3.5 years ago. The terminology changed a bit in later talks, but this represents what a customer can tell you.&lt;/p&gt;

&lt;p&gt;At a factory, new material comes in Trucks. Each truck has a load of material, which it has picked up at a certain origin. A lot is referred to as a Lot. Lots and origins are identifiable, because in case of problems (e.g. material contamination) all materials and products in which they are used need to be traced and dealt with. There are a lot of traceability related requirements that are serviced by making this things identifiable. Upon delivery, the truck dumps its load into an intake pit, and from there it is transferred to silos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyheqs50qo35varm8akzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyheqs50qo35varm8akzz.png" alt="Objects"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This diagram is an object diagram, which contains very limited information. To add more information, what I usually do, is transform it into a class diagram after constructing it together with the customer, and keep only the parts that will be relevant in the software later on. This is what is shown in the class diagram below. In this case, the truck is not relevant in the software, it is an external entity passing by, while it's load is referred to as a lot and there is no need to keep both. Similarly, the intake pit is just a physical location where material passes by, that we are not really interested in. &lt;br&gt;
Purists may say that you have to keep these things anyway, but for me this is a matter of being practical.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe4s5wjfcnjoyyjqq1lxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe4s5wjfcnjoyyjqq1lxl.png" alt="Classes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  DDD itself in a domain model
&lt;/h1&gt;

&lt;p&gt;As an exercise in my trainings, I often ask trainees to look at Domain Driven Design itself, and create a basic domain model for it. This often results in something that resembles the diagram below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fncy3cfv5wf363xjdrhpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fncy3cfv5wf363xjdrhpr.png" alt="DDD Domain Model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have no software based on this one, but one day I may put it into a wizard that guides newbies through the steps. Who knows...&lt;/p&gt;

&lt;h1&gt;
  
  
  And how do you fit DDD into any process or method?
&lt;/h1&gt;

&lt;p&gt;That of course is the main question - how does this fit in with any process or method that a company uses? The clue is in the four elements of the design activity we mentioned earlier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problem analysis&lt;/li&gt;
&lt;li&gt;Creating models&lt;/li&gt;
&lt;li&gt;Creating the design itself&lt;/li&gt;
&lt;li&gt;Combining specific problems with generic solutions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As depicted in the diagram below, we can do DDD in an iterative way. The Problem Analysis is basically performed in interviews with stakeholder experts (customer, end user, representative), and captured in the domain model. The domain model is then extended with items from the solution domain into a design model, which is the basis for implementation. Finally the implementation gets tested, evaluated and used as input for further stakeholder talks. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fazkdkndxx2lsceb4asy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fazkdkndxx2lsceb4asy1.png" alt="DDD iterations"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, only if someone would implement a pure top to bottom waterfall approach, this would be impossible to fit into their way of working. In an interative (Agile optional) approach this will fit in seamlessly, in a more waterfall like appraoch, there still is a feedback cycle somewhere that can be used to do this - and if not on project scale it can still be done on team scale or even between two or three developers and a stakeholde representative in some form. &lt;/p&gt;

&lt;p&gt;That basically explains how DDD ended up being the basis of my design training, but also of my own work since 2012. More in follow up articles.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://eepurl.com/g1oOaD" rel="noopener noreferrer"&gt;Register for my newsletter here&lt;/a&gt; to be kept up to date with my articles and trainings, and interesting references to what else is going on in the field of software engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Domain Driven Design - Eric Evans, ISBN 0-321-12521-5 Addision Wesley 2003&lt;/li&gt;
&lt;li&gt;Implementing Domain Driven Design - Vauhgn Vernon, ISBN 978-0321834577 Addison Wesley 2013&lt;/li&gt;
&lt;li&gt;DDD Community web site: &lt;a href="https://dddcommunity.org" rel="noopener noreferrer"&gt;https://dddcommunity.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>design</category>
      <category>domaindrivendesign</category>
      <category>career</category>
      <category>learning</category>
    </item>
    <item>
      <title>What would be your training needs?</title>
      <dc:creator>Angelo Hulshout 🇮🇹 🇳🇱</dc:creator>
      <pubDate>Mon, 04 May 2020 20:27:04 +0000</pubDate>
      <link>https://dev.to/delphinocons/what-would-be-your-training-needs-3oj9</link>
      <guid>https://dev.to/delphinocons/what-would-be-your-training-needs-3oj9</guid>
      <description>&lt;p&gt;So, I've been running in company trainings for years, and recently decided that open subscription trainings and online trainings may be at least as useful and maybe also more fun to do. I started by offering &lt;a href="https://www.delphino-consultancy.nl/ddd_training_online.html"&gt;my Domain Driven Design training online&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That's an easy one, because I have all the material of 7+ years of running it. However, I am curious to see what your training needs would be - given that dev.to covers a lot more topics on technology (libraries, frameworks, languages) than on design approaches and the process side of software development. So, feel free to comment and let me know - you may spark a new training that I can offer, to help some of you forward.&lt;/p&gt;

&lt;p&gt;Other ideas are also welcome, I've been considering the option of short pre-recorded mini-courses and online Q&amp;amp;A sessions as well. &lt;/p&gt;

&lt;p&gt;Fire away, I'm listening!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Software design — is it different from architecture and why do we need it?</title>
      <dc:creator>Angelo Hulshout 🇮🇹 🇳🇱</dc:creator>
      <pubDate>Tue, 28 Apr 2020 08:46:04 +0000</pubDate>
      <link>https://dev.to/delphinocons/software-design-is-it-different-from-architecture-and-why-do-we-need-it-519</link>
      <guid>https://dev.to/delphinocons/software-design-is-it-different-from-architecture-and-why-do-we-need-it-519</guid>
      <description>&lt;p&gt;This is the first article in a series that covers the contents of a training I developed (and taught) for over 7 years now. The training covers software design, using the Domain Driven Design approach as it’s basis. Why I chose Domain Driven Design is explained in a seperate article.&lt;/p&gt;

&lt;p&gt;At the start of this first article of the series, I have to thank Ewald de Bruijn and Peter Schipperen who have provided a lot of help in developing and teeaching this material over the past 7+ years.&lt;/p&gt;

&lt;h2&gt;
  
  
  An example
&lt;/h2&gt;

&lt;p&gt;So, what are we talking about when we talk about software design? Let’s start by looking at an example of a software development problem.&lt;br&gt;
Quite some years ago, I had a colleague who was working on software for a weighbridge system for a transport company. This is a relatively simple system, where a truck drives onto a weighbridge, it’s weight is determined, and a ticket with the weight is printed and handed to the driver.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lrIAaql5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9ngh429xlbn76r8vu27o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lrIAaql5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9ngh429xlbn76r8vu27o.png" alt="Weighbridge overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main actors on this system are the operator, who is responsible for weighing the truck, and the truck driver, who is driving the truck on and off the weigbridge, and gets handed the ticket before driving off.&lt;br&gt;
The whole flow related to the picture above is described as follows:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Trucks drive onto the weighing bridge. The operator checks the weight and prints a ticket with the weight. After receiving the ticket, the driver drives the truck of the weighing bridge so that the next truck can come in.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The software for this system consisted of 4 main packages&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User interface&lt;/li&gt;
&lt;li&gt;Printer Queue&lt;/li&gt;
&lt;li&gt;BridgeInterface&lt;/li&gt;
&lt;li&gt;Printer Driver&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l1mdBnGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bipqx81p0610ipru1x4g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l1mdBnGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bipqx81p0610ipru1x4g.png" alt="Weigbridge packages"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The customer of this simple software application asked to extend the text driven user interface with a simple menu to replace hand type commands, and a reporting function to get an overview of the weighings of the past 4 hours.&lt;br&gt;
This turned out to be a small problem, because the controller board had only 2kb of memory left and we needed 20kb for the software change. Yes kb, this was the 1990s, when a 1 megabyte RAM module still cost around 200 euros.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nkLRvrgh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gfj7508l6khmsbws27xq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nkLRvrgh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gfj7508l6khmsbws27xq.png" alt="Weighbridge classes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the software, which is abstracted in the diagram below, my colleague wondered what could done to reduce the amount of memory used by the existing application. It took a little bit of thinking and discussion, but in the end the solution was very simple.&lt;/p&gt;

&lt;p&gt;Looking at the usage scenario, it’s pretty obvious that the printer queue has no purpose here. At any point in time there is only one print job in progress, since no truck can enter the weigh bridge before the one on there receives its ticket and drives off. So removing the queue and the related software easily solved the memory problem.&lt;br&gt;
This is an example of how easy it is for a designer to thinking in solutions, which isn’t a bad thing in itself, but at the same time loose track of what is really needed. It pays off to keep in mind who you develop the software for, your stakeholders, and what problem they try to solve.&lt;/p&gt;

&lt;p&gt;This is one of many pitfalls in software design, all of which are avoidable as long as we are aware of them and apply the best practises for avoiding them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design
&lt;/h2&gt;

&lt;p&gt;To clarify that a bit further, let’s have a look at what software design actually is. There are many definitions, but the one that works best for me is the following:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Software design is the process of defining software structure and the related behaviour that satisfy both functional and non-functional requirements of our stakeholders”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That definition covers, for me, the most important aspect of software design.&lt;/p&gt;

&lt;p&gt;First of all, design is a process, more than (what is commonly assumed) the outcome of a process — ‘the design’. ‘The design’ is never finished, that’s what is most important to realise here: during creation of the software, the design will change due to new requirements, new insights. &lt;/p&gt;

&lt;p&gt;After creation, there will again be requirements that lead to more changes. As such, the process is more important than the result. In fact, there is nothing that can be called the results, all so called resulting designs are intermediate designs at best. I put that a bit black and white, but in essence it’s true.&lt;br&gt;
If we do want to talk about the result — and of course we do — I talk about the design model, which is an abstraction of the software solution expressed in tables, text or (preferably) diagrams that help software developers to create software that covers the issues addressed during design.&lt;/p&gt;

&lt;p&gt;Second, design should cover both structure and behaviour of the solution. A block diagram, class diagram, package diagram by itself is NOT the design model of the software. It has to be clear how the software behaves, if only because the days of simple, sequential mainframe or BASIC programs has long past. Most modern software systems handle data streams and events, and deal with things happening in specific order, or in parallel. If that behaviour is not matched to the structure, there is no design model that will help us implement the actual software.&lt;/p&gt;

&lt;p&gt;Third, the functional requirements provide little need for explanation. Of course, every software solution has to provide the functionality required by it’s users. However, we have to make sure that we cover the required functions, but also the necessary functionality to deal with errors of any kind that may realistically occur.&lt;/p&gt;

&lt;p&gt;That brings us to the fourth and final element. We have to deal with non-functional requirements, or quality attributes. These cover what some people call the ‘-ilities’ even though not all of them have a name that ends in ‘-ility’: functionality, reliability, usability, robustness, fault tolerance and so on. The notion of dealing with errors as described above shows that functionality and quality attributes (fault tolerance in this case) go hand in hand, and practise shows that this goes for any combination of quality attributes.&lt;br&gt;
In the end, in our design process and the resulting design model, we will cover choices that allow the resulting solution to balance all quality attributes that are relevant for the system at hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;So, now that we know what software design is, how does it differ from software architecture?&lt;/p&gt;

&lt;p&gt;Well, let’s start with the definition of architecture as given by the IEEE 42010 recommended practise for architecture description:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Architecture is the fundamental organisation of a system embodied in its components, their relationship to each other and to the environment, and the principles guiding its design and evolution.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In essence, despite the heavier wording, this is not so different from design. The main difference is that in larger systems, an architecture defines the overall structure of a software system, including guidelines for more detailed design work within that structure.&lt;br&gt;
This is mainly put in place to translate higher level requirements, sometimes (almost) on the meta level that the designs of all parts of the system must adhere to.&lt;/p&gt;

&lt;p&gt;As an example:&lt;/p&gt;

&lt;p&gt;A large company has a software system that has been developed over a period of more than 20 years. It covers millions of lines of code, and in order to keep things manageable, their lead architects have set up a basic structure and a set of guidelines that should be followed by all designers when extending or modifying the system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The software is divided into layers, where higher layers are further removed from the underlying hardware than lower layers — say the highest layer is the user interface, while the lowest is at the device driver level&lt;/li&gt;
&lt;li&gt;Within each layer, they defined building blocks, because the layers are cross cutting across serveral functional areas (which are orthogonal to the layers)&lt;/li&gt;
&lt;li&gt;Within the building blocks, which may be quite large, they defined the concept of components, which are small, dedicated software pieces&lt;/li&gt;
&lt;li&gt;Layers, building blocks and components have well defined, managed interfaces&lt;/li&gt;
&lt;li&gt;Each layer, building block and component has an owner, typically an architect or a senior software engineer&lt;/li&gt;
&lt;li&gt;Modifications to the interfaces cannot be made without consent of the owner, and this is actively managed through authorisations on the version control system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VTkADyTc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h37z7neqfb0pdus7c6um.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VTkADyTc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h37z7neqfb0pdus7c6um.png" alt="Layers example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, this is a very simple example, in modern architectures there are much more complex rules and guidelines than this. Just think of the security related guidelines that (should) apply to systems that manage our personal data and/or are connected to the internet. It’s those guidelines that are prescribed by the architecture, and that are to be followed in the designs that detail the parts of the architecture.&lt;/p&gt;

&lt;p&gt;On a closing note, I’d like to stress that architecture and design are both needed to develop proper software that stands the test of time and quality. In the past 20 years, I’ve seen a lot of people trying to without either one of the two, and the results are not exactly positive. Doing architecture, and doing design does not necessarily mean you have to do a lot of paper work. It’s mainly about setting up structural and behavioural rules for your solution, a framework that matches your needs and those of your customer. In follow up articles, I’ll elaborate on that — combining 25 years of working on software and systems architectures with the ideas of Domain Driven Design.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>design</category>
      <category>ddd</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
