You can learn about the architecture of an application by identifying patterns in an application's code and by studying how the components in patterns are connected. The process of such identification and study is called architectural discovery.
You can run an architectural discovery analysis on all the code in a workspace, on a resource working set of code, or on a project that you specify. An architectural discovery analysis identifies a particular design pattern by looking for code that constitutes the components, such as classes, interfaces, and packages, that form the pattern. To study the relationships and dependencies in detected patterns, you can open visual representations of the patterns.
Running an architectural discovery analysis on an application's code can provide the following benefits:
This approach helps especially when you work with unfamiliar code. By studying visual representations, you can review classes and interfaces that constitute design patterns to become familiar with the architecture of an application. For example, you can study visualizations of an abstraction in one diagram and an inheritance tree in another.
For example, in the Factory Method pattern, a class is used to create other classes. So, when you see a class in a visualization showing the Factory Method pattern, you know that the class produces other classes.
This approach helps you detect good coding patterns to retain and follow as well as coding patterns to avoid and correct.
Automated architectural discovery is an efficient way to gain an understanding of how an application is designed.