is phpBB3 object oriented or does it just use classes because it can? I've noticed in phpBB3 and 2 that it really only has a few things that seem to be managed by classes such as the dba, but I have never seen a real full-fleged 'embracement' per se of object orientation. There are no apparent patterns in the code and there doesn't seem to be a key framework, so is it actually object oriented?
** I've noticed that more of phpBB3 is managed by classes, but I have not delved into the code to see how it really works.
It seems to me on the implementation of the acl class (I'm not 100% sure on that acronym and I am curious as to what it stands for) that it is either one very large class that just has a bunch of member functions, or that it is one class that brings together other classes with no real interface.
Rather than being an accusation as it may seem, I would like to hear from the dev's/people who really know the code of if phpBB is object oriented.
p.s. Using classes doesn't make something object oriented.
Is phpBB 3 object oriented?
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Is phpBB 3 object oriented?
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev
k4 Bulletin Board version 2.0-Dev
Re: Is phpBB 3 object oriented?
phpBB 3 is and will not be OO, this was mentioned a long time ago. Something being OO doesn't mean it will give you increased performance, it may well be the opposite.
Putting something into a class with no reason is stupid, and would hinder your scripts performance, If it looks the same in a class as it does outside, don't use a class.
Now with php5 you have some extra, and class performance increase, but that depends on if you know how to use it properly. Smart use of classes is currently the best why to go. As for security, unless you need some stuff private. wrapping your coing in a function would do the same thing,
Sorry not going to say when and why to use classes, but if you have a class/extent without a class variable ($this-> / CLASS:: ), between functions or extents your doing something wrong.
P.S. No one said using classes makes it an OOP
Wrote this kind of fast, so don't bash my grammer .
Edit: change my P.S. what I really wanted to say.
Putting something into a class with no reason is stupid, and would hinder your scripts performance, If it looks the same in a class as it does outside, don't use a class.
Now with php5 you have some extra, and class performance increase, but that depends on if you know how to use it properly. Smart use of classes is currently the best why to go. As for security, unless you need some stuff private. wrapping your coing in a function would do the same thing,
Sorry not going to say when and why to use classes, but if you have a class/extent without a class variable ($this-> / CLASS:: ), between functions or extents your doing something wrong.
P.S. No one said using classes makes it an OOP
Wrote this kind of fast, so don't bash my grammer .
Edit: change my P.S. what I really wanted to say.
Last edited by Viperal2 on Thu Jun 23, 2005 12:40 am, edited 5 times in total.
Re: Is phpBB 3 object oriented?
Don't worry, I have a pretty good grasp on PHP and OOP. The reason why I don't look into phpBB's code more indepthly is because I don't want to develop 'bad' coding standards. I'm not saying phpBB's code is bad, but if I start to look a lot at phpBB's code, I will start to do things in a similar way and probably 'depend' on your code instead of finding my own way to program.
My main question was simply, is phpBB OO and if so, does it take advantage of what it can do.
Thank's for answering my question.
My main question was simply, is phpBB OO and if so, does it take advantage of what it can do.
Thank's for answering my question.
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev
k4 Bulletin Board version 2.0-Dev
Re: Is phpBB 3 object oriented?
Sorry for the negative post, I'm a bit off today.bestweb wrote: Don't worry, I have a pretty good grasp on PHP and OOP. The reason why I don't look into phpBB's code more indepthly is because I don't want to develop 'bad' coding standards. I'm not saying phpBB's code is bad, but if I start to look a lot at phpBB's code, I will start to do things in a similar way and probably 'depend' on your code instead of finding my own way to program.
My main question was simply, is phpBB OO and if so, does it take advantage of what it can do.
Thank's for answering my question.
No phpbb is not OO nor was it meant to be.
Re: Is phpBB 3 object oriented?
The best way of describing it, is that phpBB uses classes where it is appropriate to do so for things like the DBAL or the module system.
However, OO code is not the solution to everything that some people make it out to be, so in some places it is not suitable to use it and better to use normal code.
The end result is that the code both is and is not OO
However, OO code is not the solution to everything that some people make it out to be, so in some places it is not suitable to use it and better to use normal code.
The end result is that the code both is and is not OO
Re: Is phpBB 3 object oriented?
So far, this is indeed by far the most creative excuse for not actually looking into phpBB's source code ...bestweb wrote: Don't worry, I have a pretty good grasp on PHP and OOP. The reason why I don't look into phpBB's code more indepthly is because I don't want to develop 'bad' coding standards. I'm not saying phpBB's code is bad, but if I start to look a lot at phpBB's code, I will start to do things in a similar way and probably 'depend' on your code instead of finding my own way to program.
(IMNHSO, if you really did have "a pretty good grasp on PHP and OOP" you would be very unlikely to "develop 'bad' coding standards' at all, only by looking at others' source code. Because, you would most likely already have developed something that I would refer to as "pattern thinking", this would put you in the position to actually deal with pretty much most sorts of high- and low-quality sources, without having to be afraid to somehow get "infected" by a programmer's source code who doesn't have developed the same level of "grasp" that you pretend to possess. )
"If Jelsoft were to give away a pile of horse poo ... would you demand phpBB do likewise?", psoTFX being unusually diplomatic
thx,
blobber
thx,
blobber
Re: Is phpBB 3 object oriented?
To the contary - Looking at other peoples code is the best way to improve your own. I've seen things I've been doing hideously inneficiantly done a lot better in code written by others, and I've learned from it. If you're as good a coder as you say you are, you'll be able to spot the bad coding habits, and do it better yourself. Looking at others code is an invaluble way to learn.bestweb wrote: Don't worry, I have a pretty good grasp on PHP and OOP. The reason why I don't look into phpBB's code more indepthly is because I don't want to develop 'bad' coding standards. I'm not saying phpBB's code is bad, but if I start to look a lot at phpBB's code, I will start to do things in a similar way and probably 'depend' on your code instead of finding my own way to program.
My main question was simply, is phpBB OO and if so, does it take advantage of what it can do.
Thank's for answering my question.
As far as I can tell, phpBB uses OOP where it provides benafits, and then procedural code where OOP would be inneficiant and unecassary.
-
- Registered User
- Posts: 172
- Joined: Sun Aug 10, 2003 8:53 pm
- Location: folkestone, kent, uk
- Contact:
Re: Is phpBB 3 object oriented?
When would it be appropriate to use OOP in phpbb?
Re: Is phpBB 3 object oriented?
I didn't mean to give the impression that I am an excellent coder, because I am not, the real thing is that I have been developing forum softwares for the past few years. I generally find the best way to learn (for me) is to look t a small contained batch of code, such as what you might find on a tutorial or an example of a good way to go about doing things.
I have looked into the source code of phpBB, IPB and vB, but the main reason is I want to find out how you do things so efficiently. Hey, I'm contradicting myself. In doing that type of thing, I saw vB used iif() in the same way mIRC used if and I got into the mentality that "if vB or phpBB do it, then it must be a good way!"
Yes I would be *honoured* to have the most creative excuse to not look in your code I do however, look in places, for example I wanted to figure out what makes your session class work so much better than ones I've used/made. I've never actually found my answers because some of the systems I use are too different, but it has given me ideas on how to approach future ones.
generally, I think I struck the wrong tone at the start of this topic, so I appologize. I did not mean to say that phpBB SHOULD be taking advantage of OO everywhere, because that wouldn't work. I was just curious about the way you've weaved it in and around your code.
And please, what does "acl" stand for???
I have looked into the source code of phpBB, IPB and vB, but the main reason is I want to find out how you do things so efficiently. Hey, I'm contradicting myself. In doing that type of thing, I saw vB used iif() in the same way mIRC used if and I got into the mentality that "if vB or phpBB do it, then it must be a good way!"
Yes I would be *honoured* to have the most creative excuse to not look in your code I do however, look in places, for example I wanted to figure out what makes your session class work so much better than ones I've used/made. I've never actually found my answers because some of the systems I use are too different, but it has given me ideas on how to approach future ones.
generally, I think I struck the wrong tone at the start of this topic, so I appologize. I did not mean to say that phpBB SHOULD be taking advantage of OO everywhere, because that wouldn't work. I was just curious about the way you've weaved it in and around your code.
And please, what does "acl" stand for???
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev
k4 Bulletin Board version 2.0-Dev
-
- Registered User
- Posts: 687
- Joined: Sun May 11, 2003 11:17 am
Re: Is phpBB 3 object oriented?
Access Control List, if it's what I think you're talking about. It's the security apparatus that decides whether you have access to specific functions or features.
You can never go home again... but I guess you can shop there.