Structured Cobol Programming and Object Oriented COBOL...
Structured Cobol Programming and Object Oriented COBOL...
What is the difference between Structured Cobol Programming and Object Oriented COBOL programming?
- Robert Sample
- Global Moderator
- Posts: 1898
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Structured Cobol Programming and Object Oriented COBOL..
You are comparing apples to elephants. Structured programming is a concept that goes back to Dijkstra's 1968 letter to the Communications of the ACM where he suggested that the GOTO statement was not necessary and actually harmful to logic processes. Use of PERFORM statements in COBOL replace GOTO statements in structured programs.
Object-oriented programming looks at programs as objects that contain data (attributes) and have associated procedures (methods). Those associated procedures could be written using structured programming techniques, or they could be written using GOTO statements all over the place.
Object-oriented programming looks at programs as objects that contain data (attributes) and have associated procedures (methods). Those associated procedures could be written using structured programming techniques, or they could be written using GOTO statements all over the place.
- Anuj Dhawan
- Founder
- Posts: 2807
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Structured Cobol Programming and Object Oriented COBOL..
To start with, the differences are the same as any OO vs. non-OO language. OO COBOL provides support for CLASS and Objects by providing the syntax and API's (Application programming Interface) required managing those.
The main difference is that structured programming deals with the flow of execution and not, primarily, with the data (as opposed (or just different) to OOCOBOL). Structured Programming technique got it roots starting from the need of removing arbitrary jumps (GOTOs) and favored code blocks and functions. Structured programming mainly deals with the organization of the code and not with the data. By definition, "pure structured programming" let the data flow around in the form of function arguments.
In contrast, object oriented programming primarily deals with data issues. In a pure object oriented approach, the flow of program execution is mainly on "objects" and so the flow is treated as bits of behavior associated with the packets of data that are nothing but "objects".
Said all that - they are pretty much different flavors altogether and are very different to be compared, as Robert has also said.
The main difference is that structured programming deals with the flow of execution and not, primarily, with the data (as opposed (or just different) to OOCOBOL). Structured Programming technique got it roots starting from the need of removing arbitrary jumps (GOTOs) and favored code blocks and functions. Structured programming mainly deals with the organization of the code and not with the data. By definition, "pure structured programming" let the data flow around in the form of function arguments.
In contrast, object oriented programming primarily deals with data issues. In a pure object oriented approach, the flow of program execution is mainly on "objects" and so the flow is treated as bits of behavior associated with the packets of data that are nothing but "objects".
Said all that - they are pretty much different flavors altogether and are very different to be compared, as Robert has also said.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute