Learning the importance of proper architecture
A better question would be: why is caring about your architecture important? As we mentioned earlier, regardless of whether you put conscious effort into building it or not, your software will end up with some kind of architecture. If after several months or even years of development you still want your software to retain its qualities, you need to take some steps earlier in the process. If you won't think about your architecture, chances are it won't ever present the required qualities.So, in order for your product to meet the business requirements (formal descriptions of business-related objectives and expectations) and attributes such as performance, maintainability, scalability, you need to take care of its architecture, and it is best if you do it as early as you can in the process. Failing to do so could result in the issues discussed in the following two subsections.
Technical debt
Even after you did the initial work and had a specific architecture in mind, you need to continuously monitor how the system evolves and whether it still aligns with its users' needs, as those may also change during the development and lifetime of your software. Technical debt, sometimes also called software decay, software erosion or software rot, occurs when the implementation decisions don't correspond to the intentional architecture. It is a metaphor describing the trade-offs between short-term gain and long-term stability of software development.Technical debt could result from a variety of factors such as unclear project requirements, poorly written or hastily written code, hard-coded values, lack of documentation, outdated documentation, lack of testing, insufficient testing, lack of code reviews, deprecated libraries or frameworks, deferred upgrades, or accumulated bug debt.
Accidental architecture
Failing to track if the development adheres to the chosen architecture or failing to intentionally plan how the architecture should look will often result in a so-called accidental architecture, and it can happen regardless of applying best practices in other areas, such as testing or having any specific development culture.There are architectural anti-patterns and smells that suggest your architecture is accidental. Code resembling the Big Ball of Mud or spaghetti code, an architectural anti-pattern that suggests a lack of structure, is the most obvious example. Having a god object, where one entity is responsible for everything at once, is another important sign of this. Altogether, if your software is getting tightly coupled with strong dependency between software components—perhaps with circular dependencies, which occur when two or more components depend on each other— it's an important signal to put more conscious effort into how the architecture looks.Let's now describe what an architect must understand to deliver a viable solution.