Skip to content

Commit 10f3788

Browse files
#3230 - Clean Architecture.
1 parent 3c82755 commit 10f3788

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

clean-architecture/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Clean Architecture - A Software Maintainable Architectural style."
3-
shortTitle: Chain of Responsibility
3+
shortTitle: Clean Architecture
44
description: "Learn the Clean Architecture Style in Java with real-world examples, code snippets, and class diagrams. Enhance your coding skills with our detailed explanations."
55
category: Behavioral
66
language: en
@@ -9,36 +9,34 @@ tag:
99
- Architectural Style
1010
---
1111

12+
## Also known as
13+
14+
* Hexagonal Architecture.
15+
1216
## Intent of Clean Architecture.
1317

1418
The clean architecture is a software design architectural style which ensures the software application is easy to understand, maintainable and can be extend easily as per business requirement.
1519

16-
## Detailed Explanation of Chain of Responsibility Pattern with Real-World Examples
20+
## Detailed Explanation of Clean Architecture Pattern with Real-World Examples
1721

1822
Real World.
1923

2024
A real world example of clean architecture is like teh shopping mall example. There some employee is assigned to work on the filling of the products in the counter, one person is responsible for the billing purpose, one person is taking care of the security, one person is taking care of the product they have in storage. The work of every individual is separate and they are focussed on the specific task. Clean architecture also suggests to make the component separate and each component should perform some task. Clean Architecture proposes a layered architecture with clear boundaries between different system components to achieve independence of frameworks, UI, databases, and delivery mechanisms and the possibility to test in isolation.
2125

2226
In plain word
2327

24-
It help to make the system more maintainable and easy to extend.
25-
26-
## Also known as
27-
28-
* Hexagonal Architecture
28+
It helps to make the system more maintainable and easy to extend.
2929

3030
Wikipedia says
3131

3232
> The clean architecture proposed by Robert C. Martin in 2012 combines the principles of the hexagonal architecture, the onion architecture and several other variants. It provides additional levels of detail of the component, which are presented as concentric rings. It isolates adapters and interfaces (user interface, databases, external systems, devices) in the outer rings of the architecture and leaves the inner rings for use cases and entities.
3333
>
3434
> The clean architecture uses the principle of dependency inversion with the strict rule that dependencies shall only exist between an outer ring to an inner ring and never the contrary.
3535
36-
## Programmatic Example of Chain of Responsibility Pattern
3736

3837
## Clean architecture Class Diagram
3938

40-
41-
![Clean Architecture](./etc/clean-architecture.png "Clean Architecture class diagram")
39+
![Clean Architecture](./etc/cleanArchitectureUMLDiagram.png "Clean Architecture class diagram")
4240

4341
## When to Use the Clean Architecture Pattern in Java
4442

@@ -50,6 +48,8 @@ In the application say Ecommerce application user gives teh order and the applic
5048

5149
There are facility like the **product** where user can see the product details like the price and the features, **Cart** user can add the product they have selected and the **Order** where user can see the total order and calculate the price of the order. Learn how to implement this design pattern in Java with the following code snippet.
5250

51+
## Programmatic Example of Clean Architecture Pattern
52+
5353
First we have the entity class like the `Product`, `Order` and teh `Cart`
5454
```java
5555
public class Product {
42.4 KB
Loading

clean-architecture/img.png

37.5 KB
Loading

0 commit comments

Comments
 (0)