business

Verdict

Submitted 6/22/2026, 12:04:08 PM · Completed 6/22/2026, 12:06:30 PM

5.5
pivot
The idea

Is this "Pragmatic Hybrid Architecture" a valid combination of Clean Architecture, Transaction Script, Table Module, CQRS - lite, and partial DDD

Pain point
The poster faces a contradiction between adhering to Clean Architecture's dependency rules and maintaining practical execution flow.
Who has this problem
Software architects and developers implementing Clean Architecture in real-world projects
Contradiction (TRIZ)
wants clean dependency direction but cannot pass DTOs from Application layer to Infrastructure layer without breaking execution flow
Ideal final result
A seamless architecture that allows for both clean dependency management and practical execution flow, enabling the use of DTOs across layers.
Suggested solution
Implement a mediator or adapter layer between the Application and Infrastructure layers to facilitate the passing of DTOs while maintaining clean dependency direction. This layer can act as an intermediary, ensuring that the execution flow remains intact without violating Clean Architecture principles.
Show original source text →
Observed issue I was advised to apply Clean Architecture to a project, including the idea of placing the Repository interface in the Domain layer. When I tried this approach, I found that: the dependency direction is technically correct but the execution flow breaks , because the Application layer can no longer pass its DTOs into the Infrastructure layer This practical limitation made me question whether the suggested placement is consistent with the architectural principles it was based on. Context To understand the background of the suggestion, I looked into Clean Architecture, DDD, Fowler's patterns, CQRS, and Pragmatic Architecture - not in depth, but enough to understand the general ideas and how they are typically applied. Based on this exploration, and in response to the observed issue, I attempted to design a structure that: keeps dependency direction clean avoids forcing DDD everywhere allows simple CRUD via Table Module introduces Aggregates and Domain Services only when justified keeps Repository usage practical without breaking execution flow uses CQRS - lite to mitigate spaghetti - style service call chains avoids unnecessary complexity This led me to arrive at the outline of the architecture shown in the diagram. Architecture Overview (based on the diagram) The diagram represents a Pragmatic Hybrid Architecture (PHA) composed of four main areas: Controller layer Web controllers / Batch tasklets → delegate to Use - Case Handlers Use - Case layer Handler (Use Case) → Handler orchestrates application logic Command Service / Query Service (Table Module) → CQRS - lite is used to mitigate spaghetti - style service call chains Dao (Table Module interface) → domain - relevant methods are promoted to Repository For use cases that do not require DDD - style aggregates, the Application layer can continue to use Transaction Script & Table Module / CQRS - lite, which allows QueryDto objects to be passed into the Infrastructure layer without breaking the execution flow. Domain layer Domain Entities → simple table beans can be promoted into Aggregates when appropriate Domain Services → Also handles aggregate load/save/create due to architectural placement Repository Interfaces → used only when DDD concepts are needed Infrastructure layer DaoImpl (Table Module implementation) → Implements Dao (and implicitly Repository) because Dao extends Repository Integrated sources of architectural ideas This architecture integrates ideas from: Robert C. Martin - Clean Architecture Martin Fowler - Transaction Script & Table Module Greg Young - CQRS (applied in a lightweight form) Eric Evans - DDD (used only when needed) Mark Richards - Pragmatic Architecture What I want to verify Whether similar hybrid structures have been used successfully in real - world projects. Whether placing repository interfaces in the Domain layer is consistent with the principles described in Clean Architecture, DDD, or Fowler's patterns. Additional note I previously posted this question on Stack Overflow, but it was closed as the site focuses on code - level issues rather than architectural design. I am posting it here because SE.SE appears to be the appropriate venue for architectural questions. Due to language limitations, I may not be able to actively participate in discussion, but I would appreciate explanations referencing established principles or literature.
TRIZ inventive level: 3/5· Principles: mediation, parameter changes
Synthesis verdict
**Pivot**: The proposed Pragmatic Hybrid Architecture (PHA) has a well-researched and thoughtful integration of various established architectural patterns. However, its implementation feasibility depends on the team's experience and project complexity. The main challenge lies in ensuring the team has a deep understanding of the underlying patterns and technologies. The market for this as a commercial venture is limited, targeting a niche audience of mid-level developers in legacy-heavy enterprises. The real opportunity lies in teaching teams when to stop over-engineering and how to pragmatically layer patterns, which is a training or consulting market. To pivot, the focus should be on positioning the hybrid architecture as a low-friction, high-value consultancy and tooling package that bridges the gap between strict Clean Architecture and pragmatic CRUD solutions.

Strengths

  • - Well-researched and thoughtful integration of various established architectural patterns
  • - Flexible structure that balances the need for a clean dependency direction with practical considerations
  • - Clear separation of concerns between the Controller, Use-Case, Domain, and Infrastructure layers
  • - Use of CQRS-lite to mitigate service call chains and promotion of Dao interfaces to Repository interfaces when needed

Weaknesses

  • - Limited market for this as a commercial venture
  • - High complexity that may outweigh its benefits, leading to talent retention issues and scalability problems
  • - Steep learning curve for new developers, potentially leading to high turnover
  • - Potential misalignment with core principles of the integrated architectures

Best angle

Position the hybrid architecture as a low-friction, high-value consultancy and tooling package that bridges the gap between strict Clean Architecture and pragmatic CRUD solutions.

Panel verdicts

Viability

meta/llama-4-maverick-17b-128e-instruct

8.0

“The proposed architecture is a pragmatic blend of established patterns, but its implementation feasibility depends on the team's experience and project complexity.”

The proposed Pragmatic Hybrid Architecture (PHA) appears to be a well-researched and thoughtful integration of various established architectural patterns, including Clean Architecture, DDD, CQRS, and Table Module. The idea is to create a flexible structure that balances the need for a clean dependency direction with practical considerations, such as allowing simple CRUD operations and avoiding unnecessary complexity. The architecture's four-layer structure, with a clear separation of concerns between the Controller, Use-Case, Domain, and Infrastructure layers, is well-organized and easy to follow. The use of CQRS-lite to mitigate service call chains and the promotion of Dao interfaces to Repository interfaces when needed are also sensible design decisions. However, the feasibility of implementing this architecture within a short timeframe (4-12 weeks) as a solo or 2-person team may depend on the specific project requirements and the team's prior experience with the underlying patterns and technologies. The main challenge would likely be in ensuring that the team has a deep enough understanding of the various architectural principles and patterns being integrated, as well as the ability to effectively balance the trade-offs between different design considerations.

Competition

nvidia/nemotron-3-nano-omni-30b-a3b-reasoning

7.0

“Repository interfaces belong in the domain (or application) layer, and the hybrid's durability comes from strict dependency direction, not from a novel architectural pattern.”

The idea proposes a pragmatic hybrid that mixes Clean Architecture, DDD, Fowler's Transaction Script/Table Module, and lightweight CQRS. In Clean Architecture and DDD the repository abstraction is defined in the domain (or application) layer and implemented in infrastructure, so placing the repository interface in the domain is consistent with those principles. The observed execution - flow problem arises from violating dependency direction - allowing the application layer to call concrete infrastructure code directly - rather than from the repository's location. Many real - world projects already employ similar hybrids: Onion/hexagonal architectures that keep domain - level interfaces while using simple CRUD (Table Module) for most use cases, and CQRS - lite to separate read/write concerns without full - blown CQRS. The differentiation is therefore not a brand - new pattern but a disciplined combination of established practices. Its durability hinges on strict adherence to the dependency rule (use - case handlers depend on domain abstractions, not on infrastructure implementations) and on selective application of DDD constructs only when they add value. If teams relax these rules, the architecture collapses into a tangled layered design, undermining the claimed benefits. Competitors such as full Clean Architecture, Onion Architecture, classic layered three - tier, and DDD - centric repositories already provide comparable separation; the novelty lies in the explicit allowance of Table Module for CRUD and CQRS - lite to avoid spaghetti service chains. Overall, the differentiation is real but modest, and its durability is conditional on disciplined implementation.

Market

qwen/qwen3-next-80b-a3b-instruct

3.0

“The real opportunity isn't the architecture - it's teaching teams when to stop over-engineering and how to pragmatically layer patterns, which is a training or consulting market, not a product market.”

This idea is a technically thoughtful attempt to reconcile Clean Architecture, DDD, and pragmatic patterns like Table Module and CQRS-lite. However, it targets a niche audience: mid-level developers in legacy-heavy enterprises struggling with over-engineered architectures. While the hybrid approach may solve real pain points in specific codebases, the market for this as a commercial venture is extremely limited. There is no paying market for architectural frameworks like this - developers and teams either adopt established patterns (e.g., Hexagonal, Onion) or build internal solutions. No company budgets for 'Pragmatic Hybrid Architecture' as a product, service, or tool. The problem is not unmet demand but misdiagnosed monetization: the value is in consulting or training, not a packaged architecture. Furthermore, placing Repository interfaces in the Domain layer is well-established in DDD and Clean Architecture (per Evans and Martin), so the 'discovery' is not novel. The real need is not a new architecture, but better education on when to apply DDD vs. Transaction Script. The audience size is small: perhaps 10,000-50,000 developers globally who are actively wrestling with this exact tension, and even fewer would pay for a branded solution. Without a tool, template, or automation layer, this remains an academic diagram with no path to revenue.

Risk

nvidia/llama-3.3-nemotron-super-49b-v1

3.0

“PHA's complexity may outweigh its benefits, leading to talent retention issues and scalability problems.”

The proposed Pragmatic Hybrid Architecture (PHA) faces significant challenges due to its complexity and potential misalignment with core principles of the integrated architectures. **Regulation** is unlikely to be a killer within 6-12 months unless the project operates in a highly regulated industry with strict tech governance (e.g., finance, healthcare), where auditability and simplicity might be prioritized over hybrid approaches, potentially leading to **8/10** regulatory hurdles. **Platform Risk** is moderate (**6/10**) due to the custom nature of PHA, which might not be supported by mainstream platforms or future updates, limiting scalability and maintainability. **Churn** is high (**9/10**) because the learning curve for new developers will be steep, potentially leading to high turnover. **No-budget Customers** isn't directly applicable as a technical risk but implies **7/10** difficulty in selling the complexity to cost-sensitive clients. The top failure modes within 6-12 months are: 1. **Talent Acquisition/Retention Due to Complexity**, 2. **Regulatory Non-compliance in Regulated Industries**, 3. **Scalability Issues from Custom Architecture**.

Monetization

openai/gpt-oss-120b(fallback #2)

6.0

“Position the hybrid architecture as a low - friction, high - value consultancy and tooling package that bridges the gap between strict Clean Architecture and pragmatic CRUD solutions.”

The proposed Pragmatic Hybrid Architecture (PHA) solves a real pain point for teams struggling with the rigidity of pure Clean Architecture and the overhead of full DDD. As a commercial offering, it can be monetized through three primary channels: (1) consulting engagements that help organisations adopt the PHA, priced at $12,000 - $45,000 per project depending on scope; (2) a lightweight framework/library that codifies the pattern, sold as a SaaS - style subscription ($350 - $800 per developer - month) or a perpetual license ($2,500 - $7,500 per seat); and (3) training workshops/webinars ($2,500 - $5,000 per day) that teach the hybrid approach. Gross margins are high (70-85%) because the main cost is senior - engineer time, while the product component has negligible incremental cost. The conversion path is straightforward: free technical white - paper → webinar sign - up → discovery call → paid consulting or subscription. Customer acquisition can leverage content marketing, developer community sponsorships, and partnerships with larger system integrators. Risks include a limited addressable market (teams already invested in existing architectures) and competition from established DDD/clean - architecture consultancies. To mitigate, the offering should emphasize reduced implementation friction and faster time - to - value, positioning itself as a pragmatic middle - ground rather than a pure methodology. Overall, the idea has modest but tangible revenue potential if packaged and marketed correctly.

Synthesized by meta/llama-3.3-70b-instruct · 37.5s