|
What are the advantages of OPP? I haven't really understood what the big issue is about it. Whys it so great?
|
|
|
|
|
Organization and reuse of certain code bits much more easily I guess. Its all your style, but OOP is much better for certain things in my opinion.
|
|
|
|
|
Modularise all your codes.
Easier to extend, and more logical.
|
Religion should be put back in its place - beneath man, not above him.
|
|
|
|
You can reuse code bits without using OOP I just think more people use OOP because it a.) looks cool and b.) doesn't mess with variables...which you can do so without using OOP, but it would be rather useless to add on length when you can just use another method.
|
|
|
|
As has been said, OOP (Object Oriented Programming) allows you to organize information in ways that are simple to understand. Otherwise you end up with huge-ass arrays (e.g. contributors[1][resources [1][e][3]][3]). Another advantage to OOP is that you can treat all of your data separately. Meaning you can take out one function or object and replace it with another, rather than rewriting the whole code. This is what Chris means by reuse of code.
Here, you might find these helpful: www.sitepoint.com/article/oriented-programming-1 www.sitepoint.com/article/oriented-programming-2
In certain cases, of course.
You can reuse code bits without using OOP I just think more people use OOP because it a.) looks cool and b.) doesn't mess with variables...which you can do so without using OOP, but it would be rather useless to add on length when you can just use another method. For your reuse argument, sure, you can reuse a few loops or whatever, but that's hardly worth cut-and-paste. And if you're going to say you can reuse functions, you might want to take the time to think about what OOP really is...and the fact that JavaScript is an object-oriented language.
And for your a and b, again, go find out what OOP really is. You'll realize you use it alot more than you thought, and you'll realize how advantageous it can be.
Last Edit: Feb 19, 2007 15:00:26 GMT by Aaron
|
|
|
|
So, your telling me that everyone that uses OOP knows what OOP really is? I merely stated that most people use it because it looks cool and allows for manageable variables. Besides, i know what OOP is, as i'm currently learning Python And i also know that there is alot more to it than what i just said. But i highly doubt that everyone that uses it knows everything about it...xD I, myself, use both OOP and Procedural Its easier to sort out things and apply different methods to different pages and what not xD
Last Edit: Feb 19, 2007 15:38:00 GMT by 3:
|
|
|
|
So, your telling me that everyone that uses OOP knows what OOP really is? I merely stated that most people use it because it looks cool and allows for manageable variables. Besides, i know what OOP is, as i'm currently learning Python And i also know that there is alot more to it than what i just said. But i highly doubt that everyone that uses it knows everything about it...xD I, myself, use both OOP and Procedural Its easier to sort out things and apply different methods to different pages and what not xD Just makin' sure you don't scare Simie away with that last post.
|
|
|
|
Well, this topic is old O.o « Thread Started on Oct 12, 2006, 8:46pm »
Last Edit: Feb 19, 2007 16:22:47 GMT by Simie
|
|
|
|
|
Only goes to show how inactive this board is.
Was.
--- OOP definitely allowed me to tidy my code better. I already use most of the principles of OOP when I'm coding; it's just a matter of me actually using the OOP way to code.
I'm refering to PHP.
You don't really have a choice with Java and C++, so...
|
Religion should be put back in its place - beneath man, not above him.
|
|
|
|
Damn it Kai. Waste everybody's time like that.
|
|
|