Bean validation provides constraint annotations to check DTO parameters. However, what if we want to check a parameter type not supported by a standard constraint annotation?
To implement an parent object in one-to-many relation with a child object that has a composite primary key (i.e. multiple columns as primary key) is not quite straightforward.
We need to use a mix of JPA annotations along with creating some embeddable classes.
This article is the follow-up of the previous article on the basics of software development, to remind myself of what I learned in the beginning of my software developer career.
This one will deal with the famous SOLID design principles:
- Single responsibility principle
- Open/closed principle
- Liskov substitution principle
- Interface segregation principle
- Dependecy inversion principle
I learned programming concepts mostly during my school years. Unfortunately, during my professional career, when coding, I no longer used those words and I feel like I sportsman that demonstrates what’s the “way” to code instead of explaining using common concepts to my peers.
For example, I hear myself say “This feels more right doing this way because I feel that way should bring us less trouble in the future”, even after several years of development… That’s kinda sad as I’m no longer some new guy freshly coming out of school.
The purpose of this article is to remind myself the fundamental concepts and patterns.
Control the resource consumption by throttling them when limit is reached.
Docker containers running in Ubuntu 18 can’t resolve DNS as they are trying to use the default Google DNS server
220.127.116.11 as their DNS server.
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE state LIKE 'idle %' AND state_change < now() - interval '1 hour';
Handle failures that might take a variable amount of time to recover from
Handle transient failures to improve application stability.
Separate your model between write and read.