My Magical Three Keywords to Build an Efficient Software ArchitectureNovember 3, 2022
My Magical Three Keywords to Build an Efficient Software Architecture
I have three magical keywords to design, implement, test and maintain all levels of software architecture from different perspectives. These words are “simple”, “reusable” and “generic”. I use these words not only in professional life and also I try to use them in my daily life. I believe these three magical words are keys to success and one should use all three words in order to succeed !!!
There are four main or famous ways or methodologies explaining how to make an efficient & successful software development implementation.
- Agile Development Methodology → developing in iterations
- Waterfall Development Methodology → developing in sequential phases
- Rapid Development Methodology → developing small projects in a limited time with clear requirements
- DevOps Development Methodology → developing continuously to improve quality & to minimize time-to-market time
I cannot say one is better than the others as all have pros & cons. To make their pros visible & select one of these methodologies for your implementation, these four main methodologies should be evaluated according to the scope of the project, the team structure, the timeline of the project and even the budget of the project.
All these have pros & cons but when I look into deeper of these methodologies they have some keywords in common. And, luckily these keywords are exactly matching with my three keywords while designing, implementing a solution.
I always try to use these words in every step of my life in the below ways;
- Keep It Simple
- Design It in a Reusable Way
- Build It in a Generic Way
So, let’s go over these simple sentences one by one.
Keep It Simple
We are always working with complicated problems, systems, architectures, solution, applications, etc. So, looking into these complicated structures does not help us to understand what is going inside or in deeper levels.
Complexity brings more difficult items to understand and solve. So, we should decrease the complexity in the first step. Every building block should be simple as they can be. These simple building blocks should do what they should do, no less or no more. In this manner, we can control our atomic blocks and this will lead us to control more complex structures which consist smaller simple blocks.
In my first company, I was working one of the biggest Japanese home entertainment producer. One day, the lead architect visited our office and I had a chance to talk about 15 minutes with them. The sentence that I remember from that talk is “software items should always be simpler to be understood easily.” So, my first item is to keep everything (a design item, a code block, a test case, or even your condo) simple as possible !!!
Design It in a Reusable Way
One of key principle is to build you blocks in a way that they can be reused. This will save time & resources. Also, this will be minimize the operations costs as it is always to update a simple block rather than updating the whole process.
Besides the above process have not so many items in it, it has some logic to revert back in the process. So, let’s assume that this is one of our main processes.
Why not use these in our methodology/algorithm while building your blocks, processes? So, divide your complex processes into simples ones and reuse these simple processes whenever possible. You will minimize your OPEX as you do not need to update a huge block, instead you will adopt reusable blocks and make the update in one place, rather than making the change in many places. Or, if your updated reusable block cannot be used in one or more processes in the new way, you can create new reusable simple blocks from it and reuse them again.
If we go back to our process, divide this process into sub-processes and use these sub-processes in different main processes. Each task having the same color can be a sub-process and instead of using tasks in our main process, we can call/reuse sub-processes.
This methodology should also be applied while coding. Writing n number of lines for a method does not mean that you are doing the right and efficient way. Divide your methods into sub-methods that are managing specific functionality.
In that way, you can solve difficult problems in a more efficient way with lower costs and even in a shorter time as you can execute your sub-items in parallel.
We are caring about reusability in our daily lives, why not consider reusability while designing an architecture or implementing a project?
Build It in a Generic Way
Let’s assume you have different types of arrays as inputs; String array, Integer array, or any kind of array that can support sorting. Your aim is to sort the input array. So, what you will do?
- Write n number of methods in order to sort different types of arrays
- Or write a generic method that can take any type and sort as requested
Both can be applied but the logical way is to use a generic method from time, resource, cost, operation perspectives.
This can also be applied while designing a process. There is no need to design so many processes according to your input types. Design one and that process can take any kind of input and manage them inside with simple and reusable blocks.
Having each atomic structure in a generic way will make your life easier.
In a nutshell, with these three magical keywords (simple, reusable, generic), it will be easier to build large building blocks that will be used to design in large architectures.