Category: 

What Is Modular Programming?

Article Details
  • Originally Written By: Katie Walley-Wiegert
  • Revised By: C. Mitchell
  • Edited By: Lucy Oppenheimer
  • Last Modified Date: 29 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The mongoose was introduced to Hawaii in order to kill rats, but mongooses hunt in the day, while rats are nocturnal.  more...

December 7 ,  1941 :  Japanese bombers attack Pearl Harbor.  more...

Modular programming is a type of software coding and development that involves breaking data into smaller packets, or “modules.” In most cases these modules are easier for larger processing systems to absorb, which can make them faster and more efficient on the user end; perhaps more importantly to the coding side, though, is that the packets’ smaller size means they can be individually tested, developed, and refined. Breaking programs into smaller pieces has in many ways made development much more thorough and precise, and has also opened numerous doors to innovation. Parceling out programs isn’t usually as simple as simply drawing lines, though. Most of the time, modules are divided based on their core commonalities and with an eye towards minimizing overlapping dependencies the components might have in common. The end goal is usually to parcel out the program so that it can be speedily and accurately developed into one seamless whole with a minimum of effort or overlapping checks.

Ad

Basic Concept and Core Advantages

Software programming and coding comes in many different forms and can have a number of discreet goals. As operations become increasingly complex, though, the process of creating, debugging, and executing all of the individual components that together form the larger program can be a big job — in some cases, so big that things have already changed in the initial phases before the last pieces are completed. One of the most efficient ways to work around issues and maximize efficiency in building is to break the code into modules, which has become a standard way of coding in most arenas. Among other things, it's a process that generally helps shorten development time and avoid replicating code

Identifying Commonalities

Identifying commonalities within software is the foundation of modular programming. By grouping like objects and processes together and making sure each resulting module works well, the proper functioning of the entire system is enhanced. That is, if the modules function well in terms of what that module is there to do, they are more likely work well when put together.

Importance of Minimal Dependencies

Minimal dependencies among modules is another key characteristic. Basically, minimal dependencies means that there can be many relationships among objects within a module and few relationships among objects in separate modules. To assess the degree of dependency within a program, software developers employ a measurement process known as coupling. Some coupling is necessary in order for the modules to work together to achieve the goal of the software program as a whole, but to reduce the possibility of error, little coupling is best from a modular programming standpoint.

Information Hiding

Information hiding, yet another aspect often employed in this more parceled approach to programming, also helps streamline things and reduce errors and redundancies. Essentially, this feature restricts the amount of information provided to only that which is necessary. Additional, though perhaps related, information is not relayed to the user of the software or the program module that is requesting information from another module within the program.

Role of the Code Library

Modular programming typically utilizes one compiled code library, which implements consistency in the coding or programming of each module. If a program consists of Module A, Module B and Module C, all those modules will run off a single code source that is reusable across all modules. The lack of repetition for each module both enhances system performance and decreases the possibility of human error in coding.

Upgrade Potential

The concept of division makes each module and what comprises it independent of one another, but each module is still dependent on the same base code. The exclusivity between modules allows a developer to replace or upgrade individual pieces of the software at a time. A more parceled approach allows the developer to load the required parts of a program as needed. The ability to easily make additions or changes to software without the need to modify the base program also allows developers to release multiple versions of a software application that have customizable components.

Ad

You might also Like

Recommended

Discuss this Article

Soulfox
Post 3

@Melonlity -- I am not sure if we have ever been able to swap entire modules in and out to create custom software. That is because custom software (as the name implies) has unique requirements. Some modules may be close, but not perfect. Custom code still must be created.

I am not sure that we will ever get to the point where programmers can simply swap modules in and out to create new software. They may be able to borrow code (as they always have) but that is a far cry from using entire modules.

Melonlity
Post 2

@Terrificli -- I think the concept of using modular programming to create new software is alive and well. Heck, programmers have been swiping bits of code from each other for decades. It is not too much of a jump to think of them grabbing entire modules.

In fact, that is already happening through libraries of modules available to all who want to use them. Stringing modules together to create something new is still a practice that is being used regularly. I don't know if they call such borrowing modular programming, but the concept is pretty well the same.

Terrificli
Post 1

We've heard the term "modular programming" thrown around quite a bit over the years, haven't we? There was a time when modular programming was the thing that was supposed to make programming faster and less expensive?

That never quite happened, did it? I wonder why not?

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email