You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clean-architecture/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Clean Architecture - A Software Maintainable Architectural style."
3
-
shortTitle: Chain of Responsibility
3
+
shortTitle: Clean Architecture
4
4
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."
5
5
category: Behavioral
6
6
language: en
@@ -9,36 +9,34 @@ tag:
9
9
- Architectural Style
10
10
---
11
11
12
+
## Also known as
13
+
14
+
* Hexagonal Architecture.
15
+
12
16
## Intent of Clean Architecture.
13
17
14
18
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.
15
19
16
-
## Detailed Explanation of Chain of Responsibility Pattern with Real-World Examples
20
+
## Detailed Explanation of Clean Architecture Pattern with Real-World Examples
17
21
18
22
Real World.
19
23
20
24
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.
21
25
22
26
In plain word
23
27
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.
29
29
30
30
Wikipedia says
31
31
32
32
> 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.
33
33
>
34
34
> 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.
35
35
36
-
## Programmatic Example of Chain of Responsibility Pattern
37
36
38
37
## Clean architecture Class Diagram
39
38
40
-
41
-

39
+

42
40
43
41
## When to Use the Clean Architecture Pattern in Java
44
42
@@ -50,6 +48,8 @@ In the application say Ecommerce application user gives teh order and the applic
50
48
51
49
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.
52
50
51
+
## Programmatic Example of Clean Architecture Pattern
52
+
53
53
First we have the entity class like the `Product`, `Order` and teh `Cart`
0 commit comments