In this article I will try to explain about Structured, Unstructured and Modular programming approaches.
Introduction
Usually people start learning programming by writing simple and small programs. They usually write all logics at one place. This practice starts creating problems when program size gets bigger like duplicacy, redundancy, maintenance etc. To overcome this several approach came into light to make this efficient. In this article I will discuss few of those approaches.
Unstructured Programming approach
What we saw above was nothing but an example of unstructured programming style. In this approach programmer put all their code in one place or say in one program. There is no harm as such but when line of code increases, situation starts getting unmanageable. A programmer can face so many problems like:
- Duplicacy and redundancy of code
- Code maintenance problem
- Readability and many more
This approach is totally useless if working on a large project. It can be only helpful while testing one or two features etc.
Structured Programming approach
To overcome above situation it was needed to come up with a structured approach to make some code separation keeping reusability in mind. So the next approach was Structured Programming or Procedure Oriented Programming (POP) approach. In this approach a new idea came up and a set of execution code was keep in a place and it was called function.
Program was divided into separate functions which was easier to manage and re-use as compared to unstructured approach. This was very helpful from reusability point of view but still all code was in same place so still there was a problem to manage them.
Modular Programming approach
A new idea came into light and common functionalities was grouped into modules. This approach helped in dividing programs into small parts called modules. This approach was really helpful. All was good except one. All modules can have their own data and also they were capable to maintain their internal state. But this came as a problem because there can be only one state per module so each module exists at most once in a program.
All the above approach was good enough in their own scope but still there was a need for something else which may be really helpful in making programmer's life easier. And a new approach came which we popularly knows as Object Oriented Programming System (OOPS). This is really great and is using world wide these days by programmers. Hope this article helped you a lot.
No comments:
Post a Comment