The whole "core feature" thing

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
The whole "core feature" thing
« on March 11th, 2013, 05:02 PM »
I really think a separate topic for this is a better idea rather than Arantor barging in all the threads and beating the drum :P. Basically:

1) I really want to maintain my GitHub repository
2) I'd love (some) my plugins to be core (partially because I think they're quite good candidates, but mostly because that'd be quite neat)
3) I really want to develop the features further as they're something I enjoy making and improving (especially the notifications thing, I think it's awesome). But I want my main GitHub repository (really!)

So, any ideas on how to solve this problem? I got a couple,

1) Make them plugins included by default and enabled, similar to how Joomla does a lot of it's things (or even vBulletin I think?)
2) Make them pseudo plugins, something that internally work like plugins but cannot be disabled or ironed out (and hence has no UI in Plugins area), hence make them automatically build from the latest GitHub revision (or tag, we can decide that later).

Making them plugins vs no plugin is more or less an argument of semantics, I'd say they're better as plugins because:

1) It's not really any slower or faster either way
2) They are good examples of how plugins can be made
3) Plugins are easier to maintain as they're consolidated in a single place

Any ideas anyone?
The way it's meant to be

spoogs

  • Posts: 417
Re: The whole "core feature" thing
« Reply #1, on March 11th, 2013, 05:17 PM »
Hmmmmmm

I'd argue that if its included it may as well be a feature (especially if enabled by default). Including a plugin by default for the 2nd reason you mention (example of how plugins can be made) was done in SimpleDesk and I can't say it went down as expected, it turns out that it may as well had been a feature in the end.

If it is a core feature that I dont want to use then I can disable it, fine no issues there; However it is a plugin that I dont want to use I just dont want it installed at all even if disabled.

I leave the more technical side of this discussion to those with the know how :P
Stick a fork in it SMF

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #2, on March 11th, 2013, 05:30 PM »
Quote
I really think a separate topic for this is a better idea rather than Arantor barging in all the threads and beating the drum :P.
:lol:
Quote
1) Make them plugins included by default and enabled, similar to how Joomla does a lot of it's things (or even vBulletin I think?)
It isn't how vB 3 works. Maybe 4 or 5 do, but 3 doesn't.


OK, let's nail down first of all what is or is definitely not a matter of semantics, i.e. technical matters.

It means we have a little more work to do on boot than we would on an otherwise fresh out of the box system, because fresh out of the box, it realises no plugins are enabled, and has to do precisely nothing about that fact.

The other thing is, there are ways to disable it and cause the house of cards to crash down if it remains as part of the plugin system. The system is designed around trying to be resilient, e.g. disabling in the event of inability to access the folder/plugin-info.xml file, and it will forcibly disable from that point onwards. But if you have plugins linked to it, they're going to fail (though the plugin manager will attempt to deal with that too, but only in the admin panel, not more generally)

The other problem is that whatever gets made as a plugin will get less attention than the core itself when it comes to bug fixing. Just because it's consolidated in a single place, unless that place is in the core properly, it's likely to get overlooked. I found this more than once. Sad, but true, and a lesson well learned from SimpleDesk - the amount of bugs I discovered through that bastard front page plugin was incredible.

Even if it a plugin that is shipped, forcibly enabled and impossible to disable without manually fudging the DB and so on, it could still cause problems if it does ever get disabled.

But I agree on the 'being a good example'.
Quote from spoogs on March 11th, 2013, 05:17 PM
Hmmmmmm

I'd argue that if its included it may as well be a feature (especially if enabled by default). Including a plugin by default for the 2nd reason you mention (example of how plugins can be made) was done in SimpleDesk and I can't say it went down as expected, it turns out that it may as well had been a feature in the end.
Oh yes, that bastard front page. I spent far too long making that >_< It would have been better as a core feature, off by default in hindsight. But essentially that's a minor feature.
Quote from spoogs on March 11th, 2013, 05:17 PM
If it is a core feature that I dont want to use then I can disable it, fine no issues there; However it is a plugin that I dont want to use I just dont want it installed at all even if disabled.
This, ultimately. The technical issues are all surmountable, but the semantics and perception are much, much harder to move.

Particularly in the case of the notifications system, which to me is not just a core feature but it's a core feature you'd never want to disable, in which case there's no need to provide the infrastructure that gives the chance of it being disabled. That's the real advantage of it being a core feature, and I don't like having to run around pretending to the outside world that something is other than what it is.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: The whole "core feature" thing
« Reply #3, on March 11th, 2013, 05:40 PM »
I'm fairly sure vBulletin had some default plugins, but it's been a long while since I used vB4 so I'm not too confident about that. But Joomla/Drupal and majority of CMS definitely do.
Quote
The other problem is that whatever gets made as a plugin will get less attention than the core itself when it comes to bug fixing. Just because it's consolidated in a single place, unless that place is in the core properly, it's likely to get overlooked. I found this more than once. Sad, but true, and a lesson well learned from SimpleDesk - the amount of bugs I discovered through that bastard front page plugin was incredible.
This is perhaps a problem that's most prevailing to me. If a person wants to screw up his forum he can do n number of ways, deleting a couple of essential files being one of them.
Quote
Particularly in the case of the notifications system, which to me is not just a core feature but it's a core feature you'd never want to disable, in which case there's no need to provide the infrastructure that gives the chance of it being disabled. That's the real advantage of it being a core feature, and I don't like having to run around pretending to the outside world that something is other than what it is.
Currently the notifications system is based on hooks, if you want to integrate into core how would you deal with that?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #4, on March 11th, 2013, 05:47 PM »
Quote
deleting a couple of essential files being one of them.
Oh, sure. But that takes a certain amount of something really bad going on, or wilful intent to damage.
Quote
Currently the notifications system is based on hooks, if you want to integrate into core how would you deal with that?
Wouldn't be hooks. It would just be straight loadSource and direct invocation of things, plus the hooks provided by the notification system etc. would be part of the big list in ManagePlugins.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #6, on March 11th, 2013, 05:57 PM »
I would sort of like more voices on this though (especially Nao's)

I'm going on my experiences with SimpleDesk and the consequences of poorly thought out decisions that sounded good at the time and I'm sure you can see why I'm eager not to repeat that. However... I'm not totally opposed to the idea, it's just not my first choice, if that makes sense.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: The whole "core feature" thing
« Reply #7, on March 11th, 2013, 05:59 PM »
That's fair enough, it's just that I'm more of a plugin guy than a core feature type guy and modifying files things. Hence most of the things I implement are consolidated and run via hooks (even most of the projects I've created work like that). So I'm not a fan of including it into the core, IMO things should go the other way with more things being plugin (in the sense of how they are coded, not how they're presented if that makes sense. As in code should run via hooks and module).

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: The whole "core feature" thing
« Reply #9, on March 11th, 2013, 06:03 PM »
Quote from Arantor on March 11th, 2013, 06:01 PM
Would you be inclined them to break more 'core' features into modules like that?
You mean "then" right? "Inclined", yes. Willing to do? Probably not :P. I liked the direction you took with calendar.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #10, on March 11th, 2013, 06:06 PM »
See, if I'm honest I'm seeing things standing at a crossroads, as I mentioned recently, where I'm looking at adding CMS stuff and essentially building towards making the forum a key thing - but not necessarily the core of the site, meaning that you could build a site that was a blog and a gallery without being a forum.

I won't deny that I can envisage a place and a time where we head towards what smCore were building.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: The whole "core feature" thing
« Reply #11, on March 11th, 2013, 06:12 PM »
You're assuming that by making things plugin-esque I'm implying that they're removable. That's two different things. I'm merely saying that just because a thing is core doesn't mean that it has to be directly embedded into files, but it can (and probably should) use hooks.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #12, on March 11th, 2013, 06:25 PM »
Oh, yes, they're quite different, it's just that with plugin vs core, there is a semantic implication that is quite important.

If something is perceived to be a plugin, even if it isn't, it will have behaviours ascribed to it. Plugins can generally be removed with impunity and generally have no significant side effects (unless you remove, forcibly, something that is a major dependency, but even then going to the plugin manager page will do some clean up on that). Bundled-and-not-disableable plugins are still 'plugins' and could be abused in the same fashion.

Unless we do something that pulls them out of the plugin area and pushes them into another folder, e.g. in Sources, but that raises a ton of other issues (since the language loader etc. won't like it)

And people, seeing something in the 'plugin' folder might assume, however incorrectly, that it can be removed.

Which means we have one of two problems: trusting users not to do something stupid, or redesigning 'plugins' to be 'core plugins' (which means they can't be removed, but also are able to properly use some form of source, template and language loader, since none of the current options will work) which still means separate maintenance that is neither a conventional plugin or a core feature.

Which would you prefer?

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: The whole "core feature" thing
« Reply #13, on March 11th, 2013, 06:30 PM »
Perhaps a third option, a new folder in Sources that means something like modules (?) with the whole feature sitting there like a plugin folder (minus maybe the plugin-info.xml (automatically deleted on install?)) and included in a separate place then later merged with plugin behaviour on run time. Although to be honest this is more or less a special case of plugins as core plugins. You gotta trust the user a bit.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: The whole "core feature" thing
« Reply #14, on March 11th, 2013, 06:35 PM »
I don't really want to have to rewrite all of loadPluginSource, loadPluginTemplate, loadPluginLanguage[1], add_plugin_css_file[2] and add_plugin_js_file[3] but I don't see any alternative, because the core equivalents of these also aren't suitable, without rewriting the plugin anyway, to the point it might as well be a straight include...

ALL of those require the files to be in the plugins folder. Which I really don't want for the aforementioned reason.
 1. Though that needs an overhaul to handle the caching stuff
 2. Which is buggy because it hasn't kept up with the changes related to CSS files
 3. Which may also be buggy, not sure