Clean Architecture

19 views
Skip to first unread message

Kiquenet

unread,
Oct 27, 2025, 5:08:19 PM10/27/25
to AltNet-Hispano

Clean Architecture en frontend 
https://dev.to/bespoyasov/clean-architecture-on-frontend-4311

Referencias:
https://github.com/bespoyasov/frontend-clean-architecture
https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/
https://stackoverflow.com/questions/71649550/clean-architecture-react
https://github.com/WingsDevelopment/react-clean-architecture

MilanJovanovic
https://www.milanjovanovic.tech/blog/building-your-first-use-case-with-clean-architecture

Ardalis
https://github.com/ardalis/CleanArchitecture

Jason Taylor
https://github.com/jasontaylordev/CleanArchitecture

Con React
your architecture with react + redux-toolkit, local state, and custom hook store.
https://stackoverflow.com/questions/71649550/clean-architecture-react
https://github.com/WingsDevelopment/react-clean-architecture
Modularizing React Applications with Established UI Patterns by Juntao QIU
https://martinfowler.com/articles/modularizing-react-apps.html


Xurxodev respecto al artículo  https://dev.to/bespoyasov/clean-architecture-on-frontend-4311
comenta
" Observé muchas deficiencias y posibles problemas en la solución propuesta. Enumeraré algunos. Las entidades no protegían sus invariantes. Acoplamiento entre entidades de dominio. Las reglas de negocio de la aplicación y las reglas de negocio empresariales estaban confundidas. Todo se hacía con funciones, incluso aquellas con dependencias inyectadas. Este es un problema común para quienes vienen de JavaScript antiguo y se cambian a TypeScript. Y tenía más limitaciones."

https://xurxodev.com/frontend-clean_architecture/

Formación Clean Architecture
https://x.com/xurxodev/status/1925902126892425248
  1. Nuitari en discord de midudev comenta:
    "React no se enseña mal, react se usa mal
  2. el 99% abusa de useEffect
  3. crea componentes enormes
  4. no usan el efecto de limpieza
  5. no saben ni que es useMemo o useCallback (si ya tenemos el compiler)"
Only the outer layers can depend on the inner layers

SourcesDesign in PracticeSystem Design

Carlos Admirador

unread,
Feb 6, 2026, 12:20:13 PMFeb 6
to AltNet-Hispano

es cierto esto ??

Clean Architecture tiene una sola regla: las dependencias siempre apuntan hacia el dominio.

Muchos proyectos NestJS la incumplen, incluso los que dicen usar Clean Architecture.

NestJS tiene una característica clave que suele usarse mal y rompe la regla de dependencia.

Esa misma característica, usada correctamente (está en la documentación), permite cumplirla sin hacks.

La clave es entender bien la regla, saber qué hacer y qué no hacer. En la documentación aparece cómo aplicar la opción correcta.


Carlos Admirador

unread,
Feb 7, 2026, 4:46:21 AMFeb 7
to AltNet-Hispano

4 estrategias para implementar trasaccionalidad en un proyecto NestJS que usa Clean Architecture ??

Una de las estrategías utiliza una funcionalidad que existe desde Node 12 ?

analizar cada estrategia ?

  • Si viola Clean Architecture

  • Si esta acoplado al framework o alguna librería

  • Complejidad de cambios necesarios.

  • Si facilita el testing o no.

  • Si es thread safe.



 


Carlos Admirador

unread,
Feb 11, 2026, 11:13:17 AMFeb 11
to AltNet-Hispano

"managing transactions without leaking infrastructure details into the domain is a major challenge in NestJS.

Using Async Local Storage (ALS) (the Node.js 12 feature mentioned) seems to be the most 'clean' way to handle this.

It allows the Use Case to define the transaction boundary (Unit of Work) while the Repositories automatically pick up the transaction context without needing to pass an EntityManager or Client as an explicit parameter.

This keeps the Domain layer completely agnostic of the underlying database library."

Reply all
Reply to author
Forward
0 new messages