Stepping into Software Designing?
Why is software design required after all ?
So that our code is flexible, reusable and maintainable. We have heard that quite a lot, haven’t we ? But why do we want our code to be all those things? Well, one of the reasons, simply, is to save ourselves from the overwork which follows a bad design or lets-just-code-it-out technique.
But how do we go about designing?
Software Designing is just like chess. We cannot just play any move randomly or greedily. We need to carefully calculate the outcome of not just the immediate effect but the chain of outcomes our move will result in.
So, when we have nothing at all in hand, how shall we begin. Well, we can start by listing down all our requirements first. As we do so, we will eventually realise that our requirements can be divided into two broad types :
- Functional Requirements : These requirements focus upon the main function of the component in consideration and its correctness.
- Non-functional Requirements : These comprise of the other qualities a component must possess, namely, performance, security, scalability etc. An interesting thing to note here is that these qualities are often competing. We cannot have all that we desire. We have to trade-off some quality for another, say, if our code needs to be highly secure, we may compromise on performance.
So, we have our requirements in place. What now ? Next, we have to start our designing. This can be done at two levels :
- The first one being, the conceptual design. It is the higher level design and mainly about the architecture. The focus over here is on the overall conceptual integrity of the system and decide the necessary trade-offs like the one between speed and quality.
- It is followed by a more detailed technical design, which, as you would have already guessed, involves the actual code design.
These conceptual and technical designs have, in fact, a great deal of depth in them as one realises when one dwells into it.
The key here in both these levels is not to over-complicate things and to KISS (Keep It Simple Stupid) !