Onion Architecture for Modernization

244 Views Asked by At

I am working on a big modernization of .NET client server app. I am planning to apply "Onion Architecture" as i feel it is matching the modernization approach that future architecture is not yet finalized.

Anybody used Onion Architecture for legacy modernization and your inputs will be helpful.

1

There are 1 best solutions below

0
On

The core of onion architecture is your business domain. This means you either need to be an expert in the business yourself or have direct access to business expert who can explain business rules to you. If you are modernizing significant part of your application, a part fulfilling at least one cohesive business transaction, then go for the onion architecture. Otherwise onion will not help. Onion architecture provides real loose coupling. For example, in case of e-commerce check out flow - basket, payment, and stock availability may each have own onion (microservice?). Each of these onions can be implemented in different technologies, e.g. basket in MEAN stack, payment on Mainframe, and stock availability in Java. As you can see onion architecture provides decoupling of business logic from technology implementing it. If you need more information on how to effectively use onion architecture, I will refer to books about domain-driven design. InfoQ has s free one for starters, https://www.infoq.com/minibooks/domain-driven-design-quickly Feel free to contact me, if you got any questions. I am a long time practitioner of using onion architecture in conjunction with domain-driven design.