Difference between procedural and object oriented programming

There is a complete change of mindset when writing procedural code and when writing object oriented code. Procedural code is about implementing the step by step logic in your program. Object oriented code is about organizing the data and functions in your code into logical groups which we call as objects.

When should you use procedural programming?

When writing some step by step logic you should use procedural programming. Procedural programming uses concepts like loops, conditional statements etc to write a sequential logic.

When should you use object oriented programming?

When designing complex software applications you should use object oriented programming. The object oriented programming concepts such and classes, object, encapsulation etc help you in organizing all your code into logical groups. This will help you manage your code and write bigger software projects.

Is it important to learn procedural programming first and then object oriented programming?

The answer is both yes and no. We say yes because you will not start writing complex software applications the very first day. When you learn programming you first learn how to write programs to do simple tasks. These tasks are mainly procedural in nature. Therefore you will be using procedural code to write these programs. As you learn to write bigger and bigger programs you will feel the need to organize your code better so that you do not waste time in just code management. This is when you need object oriented concepts which you teach you how to manage your code.

We say no because all object oriented programming languages also have the power to write procedural code. So you do not have to learn different languages to learn procedural programming and then object oriented programming. Even if you directly start learning languages like C++ or C# or Java you can easily learn writing both procedural code and object oriented code.
The only thing you should understand is that you should not hurry up in learning any programming language. Go slow, learn the syntax of the language, learn how to write simple programs and then slowly learn how to write complex programs. Taking a wrong approach while learning a programming language will mess up everything.

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp