Structured vs OOP programming
What is Structured Programming?
Structured programming is best explained as consisting only of pure structural conditioned code and functions. In big projects you rely heavily on keeping your naming convention flexible, and a clean function collection.
What is Object Oriented Programming?
Or OOP as it’s called, is basically C with new concepts like Classes and namespaces (in some languages). Instead of relying heavily on naming flexible conventions, you can collect functions and variables into classes and objects. And you can have different sets of naming conventions.
So what’s best?
In short, what you prefer. Objectively I would say that OOP shines best in big projects, while Structured Programming shines best on smaller projects. Both ways requires 2 different ways of thinking and troubleshooting. If you are used to one of them, it might not be worth spending your time troubleshooting code and algorithms you are not used to, instead of spending your time with solving the logical problems and project definition at hand.
You might also end up with code that’s not efficient at all, just because you are unexperienced with that kind of algorithmic thinking.
What do you prefer?
I prefer Structured Programming for most of my work. I have no problems keeping a good naming convention system and function system, I rather like having to do so. And because I do a lot of small work, and just the odd big project, I think it’s more suitable for me. In the end, OOP introduces nothing I can’t do with Structured Programming of importance. It’s mainly a difference of keeping track of things.
I could of course – and I sometimes do – swap between the two and take advantage of OOP properties, but that also creates a small wave of effeciency resistance as I suddenly have to change my mindset about how I go about solving a problem. It’s easy to get lost in OOP if you don’t do your project definition homework first and plan everything in advance.
This reminds me of the quote from the original OOP inventor Bjarne Stroustrup: “In C++ it’s harder to shoot yourself in the foot, but when you do, you blow off your whole leg.” — Bjarne Stroustrup.
Leave a Reply
Welcome to Thronic.com
Search this Site
Miscellaneous Links
Recent Articles
- Linux Bash Color
- Resize a div layer with javascript
- Moving a div layer with javascript
- Web Galaxy » A sci-fi browser game
- Windows 7 on Asus Eee 900 PC
- IE and PHP sessions
- Wordpress 2.8.6 Spell Check Languages
- Reset MySQL Root Password
- Linux hosts file
- IdleGuard
- Column count in SQL
- String encryption in PHP
- Alphanumeric Captcha values in PHP
- Your own numeric Captcha in PHP
- DHTML Flyout Menus
