Software Architecture as the Pillar of your Code Base

Radhiansya Zain
4 min readMay 12, 2022

--

“Architecture is about the important stuff. Whatever that is” — Ralph Johnson

A few example of Software Architecture

Admit it, deciding what software architecture to use in your next project is one of toughest decisions we’ve ever made. Maybe I’m overreacting a bit, but for a non-senior engineer like me it is hard because of a lack of knowledge and experience in the concepts of software architecture/system design. Besides that, choosing the right software architecture is the decision you wish you could get right early in a project so it won’t burden the development process in the long run.

What is Software Architecture?

By using definitions from “Software Architecture in Practice”:

The software architecture of a system is the set of structures needed to reason about the system. These structures comprise software elements, relations among them, and properties of both.

So, software architecture is a blueprint for both the system and the project. It is an abstraction of both design and behavior to achieve a managed system complexity and establish communication and coordination mechanisms between components. Because it is an abstraction, it will work as a high level guideline to our actual implementation because real world use cases can be vary and unique.

Significance of Software Architecture

Using a proper software architecture pattern can lead to many benefits compared to not using a proper one (referred as anti-pattern). Some of the benefits are:

  • It creates a solid foundation for the software project
  • Makes your platform scalable
  • Increase code maintainability
  • Help manage complexity
  • Provides an abstraction to non-IT stakeholders

In general any architecture patterns in software architecture will help us define the basic characteristics and behavior of an application. There is no silver bullet or the best architecture, every pattern has its own drawbacks. By knowing the characteristics, strengths, and weaknesses of each architecture pattern can help us achieve our business needs and goals. Deciding which architecture pattern to use can affect the internal quality of a code base and high internal quality leads to faster delivery of new features.

Commonly Used Patterns

Layered

Layered Pattern (source: https://www.oreilly.com/library/view/software-architecture-patterns/9781491971437/assets/sapr_0101.png)

This pattern decomposes a giant service into four groups based on its task. Each layer provides services only to its next higher level.

The most common layered pattern are:

  • Presentation layer (also known as UI layer)
  • Application layer (also known as service layer)
  • Business logic layer (also known as domain layer)
  • Data access layer (also known as persistence layer)

MVC

MVC Pattern (source:https://developer.mozilla.org/en-US/docs/Glossary/MVC/model-view-controller-light-blue.png)

This pattern separate concerns of application into 3 groups:

  1. Model, contains the core functionality and data
  2. View, displays the information to the user (more than one view may be defined)
  3. Controller, handles the input from the user

Client-Server

Client-Server (source: https://darvishdarab.github.io/cs421_f20/assets/images/client-server-1-d85a93ea16590c10bed340dd78294d0d.png)

This pattern consists of two parties, a server and multiple clients. One server will provide services to multiple clients. Clients will request resources from a server and the server provides relevant resources to those clients.

Software Architecture of Our Project

In terms of software architecture, our project uses a Client-Server architecture because it uses Next.js (React) as a Frontend and Django-Rest-Framework as a Backend. And as a consequence of using Django as our server, it uses MVC architecture. By looking at that case, it is possible to utilize more than one software architecture in a particular project.

Conclusion

Choosing the right software architecture is hard, because there are a lot of factors to be taken into account, like business needs and goals, system requirements, and your knowledge as a system designer. There is no best or jack of all trades architecture, all comes with its own drawback. So, choosing the right architecture for your specific needs in the beginning can benefit you in the long run.

--

--