The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Is OOP overrated?
I just don't see why OOP is so nice.
I think it makes the script look "cooler" because it's more confusing to someone new to OOP. For those who don't know OOP I'll make two scripts. PHP Code:
PHP Code:
Name: Andrew |
#2
|
|||
|
|||
OOP is nice not because it makes the code look "nicer", but because it provides better encapsulation of the code as well as a way to easily implement reusable code that does not have multiple copies throughout multiple files. An example of how OOP can be used to create efficient code: vBulletin's data managers. When you need to alter the way a certain data is managed, you do not have to edit multiple files, but instead you just have to edit the code of that data manager.
|
#3
|
||||
|
||||
procedural and OOP do not differ much in speed when bottlenecks are removed and code is optimized. OOP is more useful when you have a large system of code where that code will be utilisized multiple throughout multiple files. with OOP you can easily reuse code and build off of existing code with no problem.
|
#4
|
|||
|
|||
I guess for database retrieval it's nice ($vbulletin->userinfo) but for what I did then it's pointless.
speaking of data managers, is there one to private message someone? Edit: nevermind, I looked for the class file. Edit 2: now I have to figure out how to use it. :ermm: |
#5
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?t=82786" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=82786</a>
|
#6
|
|||
|
|||
thanks
|
#7
|
||||
|
||||
Well, oop is overated, but on the other hand it's also underestimated.
It's not that non-plus ultra some people tend to say, but it's also not bad. same would be with aspect orientated programming languages. every thing has pro's and contras. My personal pov is that oop is very usefull in big projects with a real coding language like c++, but it's not that good that a script language like php goes more and more into oop. but as said, that's just my pov. |
#8
|
|||
|
|||
With respect to those who disagree, anybody who thinks OOP is overrated doesn't understand the massive benefits it introduces. Sure, you can get polymorphism, encapsulation, and inheritance, but you also get implied namespaces, grouping of objects, enforced code structure (abstract methods) which itself leads to polymorphism...
OOP may be confusing if you're only used to normal PHP, but once you write in something like Java, you realize how stupid half of PHP is (and how broken PHP's OO model still is). |
#9
|
||||
|
||||
C (and I mean C, not C++, C# - just C) will never die
|
#10
|
||||
|
||||
Quote:
[high]* Xenon remembers of the good old times when oop wasn't yet planned and everything was done in ASM, there you have had to know what you do ^^[/high] |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|