Design_patterns
Ever since I started looking for work, something has become extremely clear – while I am familiar with the practical aspects of software design and development, a lot of the theoretical patterns are beyond fuzzy.
To address this, I have gone back to studying some of the basic design patterns and principles, starting with SOLID, which came to light in the early 2000s.
Single Responsibility Principle The first of these five software design principles is the “Single Responsibility Principle”.
Handling MySQL Connections in TypeScript: The Good, the Bad, and the “Too Many Connections” Error When building a TypeScript application that talks to MySQL, how you manage database connections matters more than it might initially appear. A seemingly harmless pattern can quietly work its way into production and, under load, bring your application down with the dreaded:
Error: Too many connections
In this post, we will look at a bad but common approach to handling MySQL connections, why it causes problems, and then contrast it with a simple, effective approach that leverages ES modules and the Singleton pattern—without classes.