Rewrite by Design

way-of-working Jun 15, 2021

In the world of Software Engineering, a full rewrite of an existing software system is the equivalent of declaring bankruptcy. Pretty much every well-known architect we look up to for guidance tells you to never throw away an existing application to start building a new one from scratch. Instead, they recommend focusing on smaller incremental change to improve the software architecture and design over time. And while this might be the golden rule for enterprise-scale software systems with tens of thousands of users, it surely is a little different for us. Let me explain why we opted to rewrite our generator four times.

Our generator, also named the Draftsman Engine, including the Draftsman Modeling Language (DML) is our core product. It's where the magic happens and how we set ourselves apart from other serverless projects. But of course, venturing into a completely new technology stack – especially one which challenges everything you know about software engineering – is like a small child learning to swim for the first time. We generally had no idea what we're doing, so we just started to see where we would end up. Along the way, we built up a new knowledge base and began to understand the core principles of what is that we're trying to do. Or at least that's what we thought.

As time went on we learned more and more about Cloud Native development on AWS, Serverless Architecture, Event Sourcing, and Command Query Responsibility Segregation. And after we learned how to use these patterns we had to develop our Draftsman Modeling Language. It sounds really simple and straightforward on paper, but in reality, it took us more than a year to fully familiarize ourselves and build a language that we could use to generate these fully model-driven serverless applications.

During this year we moved from JavaScript-based generated code to what we now know as the pure Python Draftsman Engine. We also experimented with different Message Brokers and GraphQL API providers before settling on EventBridge and AppSync. The Draftsman Modelling Language also went through many phases and iterations before we even dared to commit to it long term. Now, these are all pivotal changes to the way the generator worked. And while we could have retrofitted all these frameworks and design changes into the original generator as we went along – small incremental change – we have the luxury of being able to design a system that's fit for purpose. In our case, where we are a team of two developers and we don't have any customers that we need to keep satisfied, we have to unique opportunity to start fresh. After all, it wouldn't make sense to continue development for our core product in a generator with a flawed design based on our limited knowledge of Cloud Native concepts.

This is of course very specific to our situation at Draftsman. And most don't have the ability to start over and rewrite their entire software system. Let alone most large-scale enterprise solutions. However, it's never a bad thing to consider the option of a rewrite, even for large-scale applications with paying customers. Let's say the functional requirements of a system change in such a drastic way, that the current software system can no longer satisfy these new requirements. In that case, we can opt for small incremental change with the risk that we are 'hacking in' a new vision for our software system, based on the design and architecture of the old functional requirements. This will likely slow down the development velocity and introduce quite a bit of technical debt to manage. In such cases, a full or partial rewrite of the software system might be in your best interest. Even Basecamp, the project management software we use, has been rewritten twice for this exact reason. Food for thought.

All in all, if the price is right, a full rewrite can be very beneficial. For us, well we simply have the luxury to learn as we go and build the system right. We are confident that the fourth version of the Draftsman Engine is stable enough to commit to for the long term. Only time will tell.


Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.