Architectural Methodology - Three-tier Fractal Architecture Demonstration#
#article/done/published
#Architecture
#Three-tier Fractal Architecture
Practice is the sole criterion for testing truth.
We have a layered approach, but is this approach effective?
Let's simulate some scenarios to see if this approach can solve our problems.
Take app development as an example.
Usually, in the early stages, there are only simple business requirements, so we focus on the business.
We have the core layer, the business layer, the support layer, and the application layer.
The support layer contains common libraries, extracted components, and other technology, frameworks, and tools unrelated to the business.
The application layer is responsible for integrating the components defined by the business layer.
The business layer is responsible for the core business logic.
![[Screen Shot 2020-12-21 at 09.02.27.png]]
As the business grows, we want to introduce the functionality of developing H5 pages in the project. This functionality is different from native page functionality and requires a WebView container as a foundation.
If we focus on H5 development, we need the support of WebView.
So in the business layer, we focus on the container.
The core layer is the container layer, providing native business containers and H5 business containers.
The application layer is the original business layer because the business depends on the container.
The support layer is the container's foundation layer.
![[Screen Shot 2020-12-21 at 09.02.38.png]]
Now we have different clients who want customized interfaces and functionalities.
We focus on customized functionality.
The core layer is the customization layer.
The support layer is the original business layer because customization is based on the existing business.
The application layer is the customized application layer.
![[Screen Shot 2020-12-21 at 09.08.41.png]]
Now let's look at our overall layering.
![[Screen Shot 2020-12-21 at 09.19.57.png]]
From an evolutionary perspective, we can clearly see how the final layering is formed, but it is difficult to understand why it is like this by just looking at the final layering.
Of course, the process of layer decomposition can continue, and this is not the end.
However, the three-tier fractal approach describes the evolution of architecture in a clearer and easier-to-understand way.