Which approach is better - Top-Down or Bottom-Up

Top-Down and Bottom-Up are the terms given to general practices followed in several industries to achieve the end result. Contrary to the common belief, these terms are no way restricted only to programming paradigm - they are widely used in investment industry, people and resource management industry, scientific institutions and many others. But, being a programmer I can only talk about the use of these terms in the context of software industry.

Top-Down approach starts with the big picture first, and then we start breaking down it into smaller problems. A very coarse example would be where we write first the main() function and only the function calls within it and later on write down the other necessary functions based on the need. Because of this very nature of the approach it is also known as decomposition approach. The emphasis in this approach is on the complete understanding of the system and thus whenever in doubt, the tendency is to put stubs in place of actual lower level functions. This leads to delay in testing and deployment, but once completed the implementation is more mature with a deep integration amongst other small pieces.

Bottom-Up approach also know as seed implementation is the one where all the lower level routines are written first and then linked together to form a complete system. Object Oriented Programming (OOP) follows this approach where we define the objects first and then use design patterns to link them together and form a complete solution. This approach allows for early and thorough testing as all the sub-modules are implemented independently. Another benefit of this approach is that any new product can reuse the already implemented sub-modules. But, this may lead to complication while integrating the complete products as entirely different teams might be involved who are only interested in their own modules rather than the complete product.

In summary, all I can say that both the approaches are being heavily used and they their own pros and cons. It should be a collective decision of all the teams working on a product as to which approach to use. At times, it is good to use a hybrid approach to reap the benefits of both the worlds. To know more about such programming practices followed in software industry, do grab a copy of my book - “Hello World: Student to Software Professional " published by Partridge (A Penguin Random House Company). Now available worldwide on all the MAJOR ONLINE Stores - Amazon, Google Play, Flipkart, Barnes & Noble and many others.
comments powered by Disqus