Showing posts with label Multi file managment in C. Show all posts
Showing posts with label Multi file managment in C. Show all posts

Managing multi-file C/C++ project


The key to better software engineering is to focus away from developing
monolithic applications that do only one job, and focus on developing libraries.
One way to think of libraries is as a program with multiple entry
points. Every library you write becomes a legacy that you can pass on to
other developers. Just like in mathematics you develop little theorems and
use the little theorems to hide the complexity in proving bigger theorems,
in software engineering you develop libraries to take care of low-level details
once and for all so that they are out of the way everytime you make a
different implementation for a variation of the problem.

On a higher level you still don’t create just one application. You create
many little applications that work together. The centralized all-in-one approach
in my experience is far less flexible than the decentralized approach
in which a set of applications work together as a team to accomplish the
goal. In fact this is the fundamental principle behind the design of the Unix
operating system. Of course, it is still important to glue together the various
components to do the job. This you can do either with scripting or with
actually building a suite of specialized monolithic applications derived from
the underlying tools.