Skip to content

Commit e346b9b

Browse files
feat(ai): polishing the content
1 parent 06f0111 commit e346b9b

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed
59.1 KB
Loading
52.2 KB
Loading

docs/index.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,51 @@
11
# Tomato Architecture
22

3-
![tomato-architecture-logo.png](/assets/tomato-arc-logo.png)
3+
![tomato-architecture-logo.png](assets/tomato-arc-logo.png)
44

55
**Tomato Architecture** is a pragmatic approach to software architecture following the **Core Principles**
66

7+
## Background
8+
When I began exploring software architecture, I came across several well-known approaches such as [Clean Architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html), [The Hexagonal (Ports & Adapters) Architecture](https://alistair.cockburn.us/hexagonal-architecture), and [Onion Architecture](https://jeffreypalermo.com/2008/07/the-onion-architecture-part-1/). At their core, these architectures share similar goals — promoting solid software design principles like separation of concerns, testability, and loose coupling.
9+
10+
Along with these principles, they also introduced certain practices that made sense for their time. For instance, when integration testing used to be difficult, isolating business logic from framework dependencies and "programming to interfaces" were great strategies to enable in-memory or mocked testing. Those ideas worked well for the challenges of that era.
11+
12+
However, over time, some of these practices have been taken to extremes. You'll often hear recommendations like:
13+
14+
* "Your business logic should depend only on the JDK — no external libraries allowed."
15+
* "Create your own logging abstraction."
16+
* "Avoid framework annotations and write XML instead to keep your core 'pure'"
17+
18+
While these ideas may sound elegant in theory, in practice they often add unnecessary complexity.
19+
Modern frameworks and libraries already solve many of these recurring problems. In the real world, companies rarely switch frameworks, databases, or message brokers overnight. Building multiple abstraction layers just to guard against that possibility usually results in more boilerplate and less productivity.
20+
21+
I've seen teams implementing Clean, Hexagonal, or Onion architectures spend a surprising amount of time on:
22+
23+
* Copying data objects across multiple layers,
24+
* Creating endless interfaces with only one implementation,
25+
* Re-implementing features (like cross-cutting concerns) that frameworks already handle elegantly.
26+
27+
With the tools we have today — Mockito for mocking concrete classes, Testcontainers for testing with real dependencies, and frameworks like Spring Boot or Quarkus that already abstract away much of the complexity — many of these additional layers are simply unnecessary.
28+
29+
![cargo-cult-programming.png](assets/cargo-cult-programming.png)
30+
31+
So I decided to take a more pragmatic approach:
32+
**Keep the timeless principles, embrace modern tooling, and focus on building simple, testable, and maintainable software — without the dogma or ceremony.**
33+
34+
That's how **Tomato Architecture** was born:
35+
**A blend of the best ideas from existing architectures, minus the cargo-cult, idealistic, and purist mindset.**
36+
737
## Core Principles
838
* Focus on simplicity — solve today's problems without overengineering for hypothetical future needs.
939
* Research, evaluate, and then commit to the right technologies instead of building layers of unnecessary abstraction for the sake of "future replaceability."
1040
* Design systems that work cohesively as a whole, not just as isolated, well-tested components.
1141
* Make architectural decisions based on what truly benefits your software — not merely because it's a trend or endorsed by popular voices.
1242

43+
![tomato-architecture-logo.png](assets/tomato-architecture-principles.png)
44+
1345
## Architecture Diagram
46+
A simple layered architecture with strict modularity goes a long way towards achieving the Tomato Architecture goals.
1447

15-
![tomato-architecture.png](/assets/tomato-architecture.png)
48+
![tomato-architecture.png](assets/tomato-architecture.png)
1649

1750
## Implementation Guidelines
1851

0 commit comments

Comments
 (0)