Fundamentals Of Software Architecture

Introduction

In this article, we will get to know the fundamentals and core concepts of software architecture but before diving into this, first, we need to know what exactly is Architecture.

Architecture is the process and the product of planning designing and constructing buildings or other structures. A good design can make a structure survive and be admired for years or fail even to stand. It's the job of the architect to join both art and science to make sure all the pieces of a building come together in a good solution. Similar to architects are Software Engineer who will need to mix the art and science to deliver the solutions in a satisfactory way but instead of bricks you will solve them with code.

What is Software Architecture?

As you googled it they are plenty of definitions available over the internet but one of the most famous and common ones is 

"Architecture is about the important stuff. 

Whatever that is"

- Ralph Jphnson

In software architecture, Three important points we need to keep in mind before doing anything with the architecture.

  1. Focus on structure
  2. Anticipate expensive choices
  3. Core decisions for high quality

we focus more on the structure more than on implementation details. Software Architecture is also about making the expensive choices that are costly to change after they are implemented. It's also about making explicit the core decisions that will allow the software to have high quality. Concepts are better understood in practice, so let's take an example of an e-commerce site and will see how that looks.

1. Get the Context 

We need to allow our users to do certain things that all come under what should the system do.

Functional Requirements 

  • Search Inventory 
  • Buy Products
  • Check reviews
  • review past orders

How should the system behave

These are sometimes defined as the ulities that the system can have like functionality, reliability, usability, efficiency, these kinds of things.

  1. Maintainability
    We wanted it to be maintainable for several years and this is known as the maintainability requirement.
  2. Scalability
    We also want to be able to serve millions of users in this case its scalability.
  3. Reliability
    We also want to make it available 24/7 for the customers, and end-users which is reliable to make sure that the system is very stable.

Finally, besides functional and non-functional requirements you may also have additional restrictions that will limit the options that you will have for your architecture. So for example, we could have some legal compliance, costs time to market, standards, etc. Several restrictions that will limit the number of options that we will have to design our system

2. Prioritize

So after you get the context, you will know all the things that the system needs to do, how it should behave and what restrictions are in place that you need to take into consideration. So after you have all of these things, you need to prioritize them. Some requirements and restrictions will conflict between them. For example, if you have too strict time to market, maybe you need to drop some features. So after you have prioritized the list and you have made this trade-off you need to think about if it's acceptable or not so after it's acceptable then you start designing the architecture.

3. Designing the Architecture 

So the first thing is once you have it prioritized start one important thing at a time. if you try to tackle everything at the beginning and try to think of all the possible scenarios in the future, you might end up having an over-engineering solution and this is not good because it is an unnecessarily complex system. What are the possible architectures that might fit your system. There are many design patterns in the software architecture and that link might help in the beginning when you're designing the system what to look for and what would be best for your system based on your current requirements. 

  1. Database design 
  2. Backend Service (API)
  3. Front End (UI)

Conclusion

So here we have defined the architecture with the structure that the system will have. The features can then be implemented following this layered architecture. It's very typical in web applications

Thank you for reading, please let me know your questions, thoughts, or feedback in the comments section. I appreciate your feedback and encouragement.

Keep learning ...!


Similar Articles