MyBB Community Forums

Full Version: why choose mybb and not phpbb or smf?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(2011-09-12, 04:00 AM)Malcolm. Wrote: [ -> ]MyBB most certainly is object orientated.
Not really. MyBB has objects and such, but it's not truly an object-oriented system.
(2011-09-12, 10:01 PM)Steven Wrote: [ -> ]
(2011-09-12, 04:00 AM)Malcolm. Wrote: [ -> ]MyBB most certainly is object orientated.
Not really. MyBB has objects and such, but it's not truly an object-oriented system.

how do you mean?

class = datahandler.php
class = datahandlers\post.php

class post extends datahandler

datahandler and post classes both have properties, methods, use inheritance, and datahandler is used by multiple other classes

one of my plugins uses the db class to create a new db object and uses it along side with default mybb db object.

how is that not OOP?
(2011-09-12, 10:27 PM)pavemen Wrote: [ -> ]how do you mean?

class = datahandler.php
class = datahandlers\post.php

class post extends datahandler

datahandler and post classes both have properties, methods, use inheritance, and datahandler is used by multiple other classes

one of my plugins uses the db class to create a new db object and uses it along side with default mybb db object.

how is that not OOP?
It's object-oriented code but the mindset and structure of MyBB as a whole is definitely not consistent with modern implementations of OOP concepts.

MyBB 2.0 will almost certainly change this.
but it is open-source and trying to appeal to the masses. if it becomes truly OOP in concept and implementation, then you will loose a lot of the appeal of new developers and "dabblers" when it comes to plugins and themes and general support even as it moves beyond what a lot of folks can comprehend or want to deal with.

yes, 2.0 will move MyBB even closer to true OOP using Yii, but hopefully they are not as abstract and not fully "DRY" as it sure does make it hard to find/follow trace PHP in such a system
(2011-09-12, 10:37 PM)pavemen Wrote: [ -> ]but it is open-source and trying to appeal to the masses. if it becomes truly OOP in concept and implementation, then you will loose a lot of the appeal of new developers and "dabblers" when it comes to plugins and themes and general support even as it moves beyond what a lot of folks can comprehend or want to deal with.

yes, 2.0 will move MyBB even closer to true OOP using Yii, but hopefully they are not as abstract and not fully "DRY" as it sure does make it hard to find/follow trace PHP in such a system
OOP isn't that hard to understand especially if proper care is taken to implement trace stacks. In the end it means more quality plugins and improvements; themes are irrelevant to OOP as theme designers will only be exposed to Twig.
(2011-09-12, 02:51 PM)Dylan M. Wrote: [ -> ]
Quote:Remember that SMF as well as this platform, MyBB, require some form of manually editing files. Whether or not they're minimalistic.

Say what?

I've authored a good many plugins and only one, yes ONE, required me to add any code to core files. Know what that code was? A single new plugin hook. A plugin hook I've requested be added to the core because it was a place where we were still missing one.

In general, with 1.6 series, you shouldn't need any core file edits to achieve what you want with the exception of the Google SEO plugin.

Then how does the plugin work if they don't make any edits? How does it exist in the admin cp if it makes no edits, how do the templates exist for it if it makes no edits? Is that even possible to do, even with a hook system?
(2011-09-12, 11:21 PM)Masayoshi Wrote: [ -> ]Then how does the plugin work if they don't make any edits? How does it exist in the admin cp if it makes no edits, how do the templates exist for it if it makes no edits? Is that even possible to do, even with a hook system?
I don't think you understand how a hook system works. A plugin registers itself with specific hooks within the code (for example, one at the beginning when the page starts loading, one in the middle, and one at the end). When a hook is encountered in the code MyBB calls all the registered plugins to run their own code at that point too.

It's the same effect but much easier and more fool-proof than edits.
How does the plugin register itself?
(2011-09-12, 11:26 PM)Masayoshi Wrote: [ -> ]How does the plugin register itself?
$plugins->add_hook('hook_name','function_to_run');

See the wiki page on authoring plugins and the hook system.
Huh, that's actually not a bad concept, especially when you're used to manually editing files.
Pages: 1 2 3 4