Micro Focus QTP (UFT) Forums
POP versus OOP paradigm in DP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: POP versus OOP paradigm in DP (/Thread-POP-versus-OOP-paradigm-in-DP)



POP versus OOP paradigm in DP - jp@QTP - 06-30-2008

Hi,
I have found that most QTP developers favor Procedure Oriented Programming over Object Oriented Programming though VBScript supports classes (of course, OOP in VBScript is not so extensive). I strongly favor OOP for following reasons:
1.Abstraction: For instance, in Class_Initialize we can load required information in instance variables and Class_Terminate we can set them to Nothing. At some point of time, Garbage Collector will reclaim memory.
2.Minimize usage of Global variables.
3.Maintainability: Using classes we can organize code in much structured manner as compared to independent functions/Subs. It is easier to locate required function. If TDS is used it can be significantly productive.
4. Possibility of reusing variable names and function names without any possibilities of any name conflicts.

Both approaches can solve a given problem but in a different way. We have to choose a better way.

Any thoughts on this? I will grateful if anyone can add any advantage of Procedure Oriented Programming over Object Oriented Programming.