Abstraction .. Just a thought

Discussion of general topics related to the new version 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!
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!
Post Reply
User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Abstraction .. Just a thought

Post by Prince of area51 »

I have been using phpBB for quite some time and I'm so impressed by the code (and the standards), that I use it now in my everyday life to develop all sorts of professional applications. I go through phpBB3 code all the time, seeing how things are done and how problems are solved. One thing I have been thinking about for some time was the abstraction.

I know people keep asking 'features' and I find this a bit weird. Being a hard-core developer, I believe that the 'core' code should be as simple as possible. It should only provide a basic functionality (I'm not saying the code should be simple). Then we can have Mods that can be used to 'expand' the functionalities of the forum to serve its purpose.

For example:
There might be one forum who is targeted towards web-developing community, that forum would need options where they can handle support requests, marking threads as solved, unsolved, probably rating posts, rating users who help resolve queries.
And then there might be a forum where people come to talk about their cars, each user might want a picture gallery of their own and the forum hosts a event calendar of all drive-by and cruise events.

I know someone you might be saying so what phpBB3 (and even phpBB2) can do all that. I would definitely agree with you on that. The problem starts when certain features are requested to be part of the main code. For example, it doesn't matter how much popular Quick Reply or Shoutbox might get, it should (and would) never be part of the core code. Some of you might feel like hitting me but some might see where I'm going with this..

I remember an incident related to PHP, it started by everything being in 'one' piece of (rather huge) code. Then someone thought breaking up the whole app into libraries, so if I want to use feature A and feature B, I include feature A and feature B libraries.

To be more direct now, if I need to use private messages, I include the private messages library, otherwise there wouldn't be any private message functionality. The core code should not depend on PM library to be present (but if some other library requires PM library to be present, then it has to be added). If I don't need the attachment functionality, I would not include the attachment library. This way the core remains clean and expandable. Hopefully, some of you might get the drift ..

I'll summarise .. The core should be a framework (and one hell of a framework), the functionalities should be kept separate, imagine a scenario where an attachment library releases its patch for a bug, no one needs to update the core, or any other library, just the attachment library needs updating ..

I know its too much work for any of this to be addressed at phpBB3 level but I just felt like talking about it. I'm finishing my degree this summer and I would have spare evenings. I do plan to fork phpBB and start a 'cut-down' version to achieve something similar but all that's in my head at the moment. Hopefully I'll see some interesting comments .. and oh thanks for reading such a long post :)

PS: English is not my first language, so I apologise in advance for stupid grammar.

User avatar
Kellanved
Former Team Member
Posts: 407
Joined: Sun Jul 30, 2006 4:59 pm
Location: Berlin

Re: Abstraction .. Just a thought

Post by Kellanved »

Yes, that's on the agenda.
No support via PM.
Trust me, I'm a doctor.

andyajadeh
Registered User
Posts: 5
Joined: Sat Feb 16, 2008 12:58 pm

Re: Abstraction .. Just a thought

Post by andyajadeh »

A rewrite router is also good :P

Post Reply