What Would Albert Camus Think About Software Development?

Thoughts about Absurdism, essence, and software design. | Continue reading


@khalilstemmler.com | 2 years ago

Use DTOs to Enforce a Layer of Indirection – Node.js with TypeScript

DTOs help you create a more stable RESTful API; they protect your API clients from changes made on the server. | Continue reading


@khalilstemmler.com | 3 years ago

Absolute and Relative Complexity

Determining if the complexity of a problem is related to the nature of the problem or related to the way that we approach solving it. | Continue reading


@khalilstemmler.com | 4 years ago

Nested GraphQL Resolvers and Separating Concerns

Two approaches to implementing separation of concerns and better cohesion of operations in your GraphQL schema. | Continue reading


@khalilstemmler.com | 4 years ago

GraphQL's Greatest Architectural Advantages

There's a lot of advantages to using GraphQL instead of REST on your server, and there's a lot of advantages to using Apollo Client instead of writing your own data-fetching logic. In this article, we talk about some of GraphQL's greatest architectural advantages. | Continue reading


@khalilstemmler.com | 4 years ago

I Write Testable Code – Khalil's Simple Methodology

The single biggest thing that improved the quality of my designs was understanding how dependencies influence my ability to write tests. In this article, I'll show you how I write testable code. | Continue reading


@khalilstemmler.com | 4 years ago

Why Event-Based Systems?

There are so many reasons why event-based systems are the standard for large-scale enterprise applications like GitHub, Facebook, Google, etc. In this article, I list a few reasons why I believe in 'em. | Continue reading


@khalilstemmler.com | 4 years ago

Apollo REST Data Source Deduplicates and Caches API Calls [Deep Dive]

Apollo's REST Data Source does a lot more than you'd think behind the scenes, and that's why it's recommended instead of using a wrapped HTTP library like Axios or Fetch in order to hook up data to your resolvers. | Continue reading


@khalilstemmler.com | 4 years ago

When to Use a Private Constructor – Object-Oriented TypeScript

In this blog post, I explain how using a private constructor helps to force a single way to create an object, and why it's most commonly used with the Factory Pattern. | Continue reading


@khalilstemmler.com | 4 years ago

I'm Learning Everything GraphQL in 2020

GraphQL is the latest API style on the block. It's a modern way for us to pull data out of your system (queries) and make changes to your system (mutations). I'm finally committing to learning everything GraphQL in 2020. In this article, I'll break down my personal learning roadm … | Continue reading


@khalilstemmler.com | 4 years ago

How to Learn Software Design

Software Design and Architecture is pretty much it's own field of study within the realm of computing, like DevOps or UX Design. Here's a map describing the breadth of software design and architecture, from clean code to microkernels. | Continue reading


@khalilstemmler.com | 4 years ago

The Full-Stack Software Design and Architecture Map

Software Design and Architecture is pretty much it's own field of study within the realm of computing, like DevOps or UX Design. Here's a map describing the breadth of software design and architecture, from clean code to microkernels. | Continue reading


@khalilstemmler.com | 4 years ago

Decoupling Logic with Domain Events [Guide] – DDD with TypeScript

In this article, we'll walk through the process of using Domain Events to clean up how we decouple complex domain logic across the subdomains of our application. | Continue reading


@khalilstemmler.com | 4 years ago

Does DDD Belong on the Front End? – Domain-Driven Design with TypeScript

Should we utilize Domain-Driven Design principles and patterns in front-end applications? How far does domain modeling reach from back-end into front-end? | Continue reading


@khalilstemmler.com | 4 years ago

Does DDD Belong on the Front End?

Should we utilize Domain-Driven Design principles and patterns in front-end applications? How far does domain modeling reach from back-end into front-end? | Continue reading


@khalilstemmler.com | 4 years ago

I Don't Use a DI Container

Instead of a DI Container, I just package features by component and use logical naming conventions. | Continue reading


@khalilstemmler.com | 4 years ago

How to Organize Logic in Large Applications

In this article, you'll learn about the Clean Architecture, why we should separate the concerns of large applications into layers, the 6 most common types of application logic, and which layer they belong to. | Continue reading


@khalilstemmler.com | 4 years ago

Common Types of Logic in Large Applications [with Examples]

In this article, you'll learn about the Clean Architecture, why we should separate the concerns of large applications into layers, the 6 most common types of application logic, and which layer they belong to. | Continue reading


@khalilstemmler.com | 4 years ago

Dependency Injection and Inversion Explained – Node.js with TypeScript

Dependency Injection and Depdency Inversion are two related but commonly misused terms in software development. In this article, we explore both types of DI and how you can use it to write testable code. | Continue reading


@khalilstemmler.com | 4 years ago

Brutalist Web Design

The term brutalism is often associated with Brutalist Architecture, however it can apply to other forms of construction and art, such as web design and music. | Continue reading


@khalilstemmler.com | 4 years ago

How to Prevent Your DDD App from Blowing Up by Implementing CQS/CQRS

CQS (Command-Query Segregation) is a design principle that states that a method is either a COMMAND that performs an action OR a QUERY that returns data to the caller, but never both. | Continue reading


@khalilstemmler.com | 4 years ago

Command Query Segregation – Object-Oriented Design Principles with TypeScript

CQS (Command-Query Segregation) is a design principle that states that a method is either a COMMAND that performs an action OR a QUERY that returns data to the caller, but never both. | Continue reading


@khalilstemmler.com | 4 years ago

BYOC (Bring Your Own Compiler) – Getting Started with TypeScript and Node.js

In this guide, we walk through the process of creating a TypeScript project from scratch with hot-reloading, and scripts for building, development, and production environments. | Continue reading


@khalilstemmler.com | 4 years ago

Functional Error Handling with Express.js and DDD – Enterprise Node.js

How to expressively represent (database, validation and unexpected) errors as domain concepts using functional programming concepts and how to hook those errors up to our Express.js base controller. | Continue reading


@khalilstemmler.com | 4 years ago

Handling Collections in Aggregates (0-to-Many, Many-to-Many) – TypeScript DDD

In this article, we discuss how we can use a few CQS principles to handle unbounded 0-to-many or many-to-many collections in aggregates when designing web applications for performance. | Continue reading


@khalilstemmler.com | 4 years ago

How to Design and Persist Aggregates – Domain-Driven Design with TypeScript

In this article, you'll learn how identify the aggregate root and encapsulate a boundary around related entities. You'll also learn how to structure and persist aggregates using the Sequelize ORM on White Label, the open-source Vinyl Trading app. | Continue reading


@khalilstemmler.com | 4 years ago

There Is No Dominant Paradigm

Functional programming is not the end to all of our problems. Quality software is all three paradigms. | Continue reading


@khalilstemmler.com | 4 years ago

Intention Revealing Interfaces [with Examples] – DDD and TypeScript

An intention revealing interface is a standard for writing code that is expressive enough to adequately explain it's purpose without needing to explain implementation details. In this article, we look at how to use intention revealing interfaces to write code that is well-underst … | Continue reading


@khalilstemmler.com | 4 years ago

Where Do Domain Events Get Created? – DDD with TypeScript

In this post, I explain how good ol' fashioned encapsulation + TypeScript getters and setters enable us to effectively create Domain Events directly from the aggregate roots in our domain-driven design projects. | Continue reading


@khalilstemmler.com | 4 years ago

Are TypeScript getters and setters useless?

In this blog post, we talk about the utility of getters and setters in modern web development. Are they useless? When does it make sense to use them? | Continue reading


@khalilstemmler.com | 4 years ago

Conway's Law and Domain-Driven Design

Originally published here June 2019, with discussions on Hackernews and Reddit. Melvin Conway is credited with that quote back in 1967.In simple terms, Conway… | Continue reading


@khalilstemmler.com | 4 years ago

Better Software Design with TypeScript Application Layer Use Cases

In this article, we explore how organizing application logic as Use Cases in the application layer helps to make large typescript projects easier to reason about. | Continue reading


@khalilstemmler.com | 4 years ago

Implementing DTOs, Mappers and the Repository Pattern – DDD with TypeScript

There are several patterns that we can utilize in order to handle data access concerns in Domain-Driven Design. In this article, we talk about the role of DTOs, repositories & data mappers in DDD. | Continue reading


@khalilstemmler.com | 4 years ago

Name, Construct and Structure – Organizing Readable Code

Naming files & folders well, using well-understood technical constructs and strategically organizing files well are three ways to improve our ability to change code quickly. | Continue reading


@khalilstemmler.com | 4 years ago

Domain Knowledge and Interpretation of the Single Responsibility Principle

The Single Responsibility Principle specifies that a class or function should only have one reason to change. Admittedly, that's not very clear. This article describes why understanding the domain is important to know how SRP can be implemented. | Continue reading


@khalilstemmler.com | 4 years ago

Bootcamps, JavaScript and Over $85B spent yearly fixing bad code

More and more money is being spent by companies on maintaining bad JavaScript code. Here's where I think our industry needs to change. | Continue reading


@khalilstemmler.com | 4 years ago

Clean Node.js Architecture

In this article, we'll look at the various different versions of the "clean architecture", simplify it, and understand how we can use it to write more flexible Node.js code with TypeScript. | Continue reading


@khalilstemmler.com | 4 years ago

Understanding Domain Entities [with Examples] – DDD with TypeScript

Entities are the first natural place we should aim to place business logic in domain-driven applications. In this article, we talk about the roles and lifecycle of an entity in Domain-Driven Design. | Continue reading


@khalilstemmler.com | 4 years ago

Knowing When CRUD and MVC Isn't Enough

MVC the granddaddy of application architectures. In this article, we explore common MVC patterns, the responsibilities of the "M"- model, and when it makes sense to look to other architectures. | Continue reading


@khalilstemmler.com | 4 years ago

Solid Principles: The Software Developers Framework to Robust, Maintainable Code

The SOLID principles are a set of software design principles that teach us how we can structure our functions and classes to be as robust, maintainable and flexible as possible. | Continue reading


@khalilstemmler.com | 4 years ago

Categories of Hard Software Problems

Recycled from the 'When to Use TypeScript' [Guide] article posted April 6th, 2019The Performant System Problem, the Embedded System Problem, and the Complex… | Continue reading


@khalilstemmler.com | 4 years ago

REST-First Design Is Imperative, DDD Is Declarative – DDD with TypeScript

A comparison between designing Node.js applications using REST-first design and Domain-Driven Design. | Continue reading


@khalilstemmler.com | 4 years ago

Flexible TypeScript Error Handling with the Result Class

Purposefully throwing errors can have several negative side effects to the readability and traceability of your code. In this article, we take a look at an alternative to how to handle errors within your Node.js + TypeScript applications. | Continue reading


@khalilstemmler.com | 4 years ago

Clean and Consistent Express.js Controllers – Enterprise Node.js and TypeScript

In this article, we explore how to structure a clean and consistent Express.js controller by using abstraction and encapsulation with TypeScript. | Continue reading


@khalilstemmler.com | 5 years ago

Introduction to Domain-Driven Design with TypeScript

Domain-Driven Design is the approach to software development which enables us to translate complex problem domains into rich, expressive and evolving software. It's the way we design applications when the needs of our users are complex. | Continue reading


@khalilstemmler.com | 5 years ago

Value Objects – DDD with TypeScript

Value Objects are one of the primary components of Domain-Driven Design. Here's a simple Value Object class in TypeScript. | Continue reading


@khalilstemmler.com | 5 years ago

When to Use TypeScript – A Detailed Guide Through Common Scenarios

Strap yourself in. In this guide, we compare when it's absolutely vital to be using TypeScript, the strictly-typed programming language, and when it makes sense to stick to vanilla JavaScript. | Continue reading


@khalilstemmler.com | 5 years ago

Fixing Sequelize Models with Migrations

Sequelize is a great ORM for NodeJS applications that are built on relational backends. Inevitably, you'll need to update your models as the database requirements change.. or if you did something silly. Here's a real life approach to using Sequelize to doing database migrations. | Continue reading


@khalilstemmler.com | 5 years ago