Software Architecture

Rhendy rivaldo
Akhirnya
Published in
4 min readMay 13, 2020
Source: hrinfo.net

Software architecture is a structural component we choose to use in building a software application in order to meet the business requirements and expectations. The choosing of the architectural component that we use have to be thoroughly calculated, because a mistake in the start could result in a long, endless road of finding the correct solution to the problem that might occur.

There are a lot of characteristics that have to be considered in determining a software architecture. Those includes flexibility, scalability, feasibility, reusability, and security. A lot right? Yes, and following the fast and vast development of software engineering, there might be more characteristics you might want to consider.

There are also a lot of types of software architecture, each with their own pros and cons, and as I read and observe, I found 2 types of architectures that keeps appearing in either the search or the articles that I read. Here they are:

Layered Architecture

Layered (n-tier) architecture is probably the most commonly used because most this architecture is usually relied on database, and most business depend on data stored in tables.

The codes are arranged so the data from the bottom layer, usually the database, can be retrieved by any other upper layers, for different purpose depending on the specific task carried by each layers. It is common for each developer to work on a particular layer, separately from other layer.

Model-View-Controller, a pattern widely used by most web frameworks, can be considered as Layered Architecture. The database is included in the Model layer, where it also contains some business logic and types of data in the database. In the middle, there is controller which transforms the data and move it from the model layer into the topmost layer, the view, which handles the user interface, usually the HTML, CSS, and JavaScript.

The layered architecture is best for new applications that needs to be built quickly since it is the most well-known architecture, and the easiest to implement. It is also perfect for applications that requires high maintainability and testability, because every layer is isolated and therefore can’t be affected by changes from other layers, allowing easier refactoring and error fixing. The architecture is also good for new, inexperienced developers that haven’t understand any other architectures, also because it is the most commonly used architecture in web frameworks.

Microservice Architecture

Microservice architecture is the opposite of a monolithic architecture. What is it? Monolithic architecture is an architecture where all component, such as user interface, business logic, and database in the application is developed as a single, unified program with multiple modules. This is the most basic approach in software development, however, there is a problem. Monolithic architecture is not scalable and maintainable, because when the software grow bigger and there are a lot of access per time unit, the performance itself will decrease, and it will require better, and more expensive server to handle it. Also, it will also be resistant to changes. In example, a change of technologies would affect the whole system, and we will have to change the program too. And don’t forget about errors that might occur. A single error in any module can bring the system down!

These problems can be handled by microservice architecture. Instead of building a single huge program, the microservice splits the app’s feature or components into smaller services that can be deployed and scaled independently from other components. This offers a loosely coupled, independent, maintainable, and flexible development of the software.

Each of the service can have their own database and different technology stack, and the service communicate with each other with communication protocol like REST with JSON.

But, the switch between microservices comes with some cons, it requires an experienced team. The benefits of microservice wont be felt if you have unprepared team. Every team member needs to have the knowledge of microservice to be able to implement it, without being confused because of the multiple services that are available.

How We Do It In the Software Project Course

Because we are using Django, we following the standard architectural offered by Django which is Model-View-Template (MVT). It is some kind of a derivation of MVC, only in MVT, the whole framework acts as the controller that processes HTTP requests and routes it to the proper view functions.

How request is processed in Django

Conclusion

There are pros and cons in each architectures, as I mentioned above. That’s why there are a lot of characteristics needs to be considered in choosing one of those, as I also mentioned above. It is required that the development team consider every requirements given to decide which architecture is implemented, because it will save you a lot of costs, time, and energy in the future.

References:

--

--