Page 2 of 2

Posted: Wed Jul 27, 2005 9:43 am
by crazytopu
theda wrote:
What is the use of OOP if all you're doing is a few this->here stuff? I'm not seeing the logic in the need for OOP, unless just for learning purposes.
Unless you know what you are talking about, i guess, reading up a bit on OO woudl have helped. In brief, OO gives you untimate flexibily when it comes to do modifications in the future, you can reuse things rather than re-inventing the wheel. It helps cut your developtment time significantly resulting in fast software development. What else do you need?

Posted: Wed Jul 27, 2005 9:56 am
by Roja
theda wrote:What is the use of OOP if all you're doing is a few this->here stuff? I'm not seeing the logic in the need for OOP, unless just for learning purposes.
Personally, the biggest value to me for OOP is encapsulation.

I can take a group of useful functions, that work on similar data (objects), and wrap it all together. I can then share that class with other people.

Functions aren't as useful, because they are ignorant of data. Procedural code isn't as useful, because its not easily added to other programs.

But beyond encapsulation, it also enables easy testing. Any given class has inputs, outputs, and expected results. By testing those results, you can build better code.

Its not just about whether you say $variable or $some->variable, its about *structure*, and keeping code seperate and reusable. Thats what allows one person to write 40k+ lines of code instead of 4k+.

Posted: Wed Jul 27, 2005 12:45 pm
by pilau
Couldnt put it better. Besides, being able to program OO programs is something you should be proud of, it requires a lot of originality and knowledge of the programming language. Which, in other words, makes you better than other programmers.