Category: Architecture
-

Why You Should Never Use Floating Point for Money
The floating-point arithmetic are inadequate for financial systems, advocating for the use of BigDecimal to ensure precision and avoid rounding errors. Key principles include domain isolation, stringent data types, and thorough edge-case testing. Proper implementation is crucial for maintaining price integrity and avoiding financial discrepancies.
-

Optimizing Search Performance with CQRS: Relational Writes and NoSQL Reads
Most developers initially rely on relational databases, but as search demands grow, performance declines. Command Query Responsibility Segregation (CQRS) effectively tackles this by separating read and write operations. The write side focuses on data integrity, while the read side prioritizes speed, often utilizing NoSQL stores for efficient retrieval and eventual consistency between systems.
-

Granular Authorization in Spring Boot: Beyond Role Checks
Most applications have robust authentication and brittle authorization. A single if (user.isAdmin()) block guarding critical data is not a security model — it’s a liability. This post walks through the evolution from scattered role checks to a clean, declarative ABAC approach using Spring Security’s PermissionEvaluator, RoleHierarchy, and SpEL.
-

Event-Driven Architecture with Spring Boot and AWS EventBridge: Escaping the Distributed Monolith
Most microservice migrations just trade a local monolith for a distributed one. This post covers how to implement Event-Driven Architecture with Spring Boot and AWS EventBridge — from choreography patterns and schema contracts to idempotency and distributed tracing.
-

The Command Pattern in Java: Eliminating Fat Service Classes with Commands and Handlers
Fat Service classes are a liability — one class that does everything is a class that’s impossible to test and dangerous to change. This post shows how to apply the Command pattern in Java using Records, Repository interfaces, and single-responsibility Handlers to keep your business logic clean and isolated.
-

The Microservices Tax: Why Your Distributed Architecture is Failing You
Stop treating microservices like a trophy and start treating them like a tax. While we are told they decouple teams and improve scale, most developers are simply trading code complexity for unreliable network calls and distributed data corruption. If you can’t maintain clean boundaries in a monolith, moving to microservices will only result in a…
-

The Singleton Delusion: Why Your Implementation is Probably Broken
Most developers treat the Singleton pattern like a relic from 2010—something they “know” but haven’t actually audited in years. We’ve been conditioned to believe Singletons are “evil” or “hard to test,” leading to a trend of pulling in massive Dependency Injection frameworks just to manage a single Logger instance. This resume-driven development adds unnecessary bloat…
-

Layered Architecture in Java: A Practical Guide to Keeping Your Code Clean
The post emphasizes the importance of structured programming to avoid spaghetti code, advocating for a layered architecture. It delineates three layers: Presentation, Business, and Data layers, each with distinct responsibilities. Defining a clear structure early in project development facilitates effective teamwork and ensures scalable, maintainable applications by keeping concerns separate.
-

Architecture, DevOps and Security: The 3 Pillars to Grow A Product
A company’s success hinges on its product, which requires strong architecture, DevOps, and security from the start. Neglecting these areas leads to chaos and difficult scaling. Automating processes and maintaining security standards are essential for efficient growth. Investing in these pillars prevents costly issues, ensuring a healthier product lifecycle and company sustainability.
-

How to Organize the Packages of your Project?
Struggling with the eternal Java dilemma of how to organize your project? You’re not alone. From feature-focused structures to classic layer-based setups, choosing the right package organization can make or break your sanity (and your code). In this article, we explore how to structure your Java project effectively, whether you’re working on a sleek online…
