Reputation: 5513
Modularization is obviously important in software projects, but I want to know people's opinions on how important and for what reasons it is important. I've obviously got my own ideas since I'm asking this, but think of it like a "common brainstorm" of the reasons one should modularize one's software projects...
Upvotes: 9
Views: 6355
Reputation: 1324148
It can also be viewed as a basic activity of Application Architecture which:
That is why a "financial portfolio computation" will actually be divided into:
Plus several transversal ones:
To treat that kind of functional requirement as one big monolithic module would force the development to implement all the sub-routines in sequence as a all.
Whereas with a clear application architecture, you can begin to work on the more general and transversal modules while still refining the other more business-oriented modules.
It also forces you to define more interfaces, and to analyze the inter-communications issues your different modules will have to solve (direct n-to-n typology? Bus?, ...)
Upvotes: 0
Reputation: 203
Modularization and decoupling are important for many reasons, some are:
Upvotes: 1
Reputation: 150108
We humans are limited when it comes to grasping complex problems all at once. However, we are gifted in the ability to decompose a complex problem into a (possibly very large) number of individual problems that are not too complex in order to tackle the big problem.
This is fundamentally what drives answers like "reuse", "separation of concerns", "easier maintenance".
All of these reasons are true whether it is one person breaking down a complex problem to tackle piece-by-piece, or if it is a team of people breaking it down to distribute the complexity.
Upvotes: 5
Reputation: 158309
My main reasons for putting code into different modules:
Upvotes: 2
Reputation: 17929
I think one of the main aspects is reuse. When you build things modularly, there's hardly things like: "Oh, I've already done this before, but to use it, I'll also have to get this and this functionality, which has absolutely nothing to do with my application".
Also, it is easier to understand. I can't keep tons of things in my mind at the same time. When the code is modular, there's easier to establish an "area" of things that makes sense in themselves. And once this area tends to be small, I can understand it as whole rather than pieces of it.
Finally, when things are smaller, it is easier to test and maintain. Also, your tests indicate faster where the error is, once they will test only a small part of the application.
Upvotes: 4