Package Manager, how we won't miss thee

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Package Manager, how we won't miss thee
« on June 22nd, 2011, 06:12 PM »
The question about the package manager, SMF mods in general, still haunts us. I recently proposed what I want to do about it to the private board, and now I'd like to expand on that and put it in general terms for everyone; my proposal was more technical than general in nature. Besides, I figure that you want to see not only where we are but a few thoughts and insight into where we're going. (That's what the blog's for, right? :lol:)

SMF's package manager is an interesting artefact, and certainly more than a nod to what came before. But we're bidding it farewell in Wedge, to be replaced with a very different beast, even if it looks similar on the surface.


The Add-on Manager. It sounds nicer than package manager, and it implies its purpose better; packages don't just have to be new functions even in SMF, they can be packs of avatars, language packs and so on, whereas an add-on is physically a new thing added on to the core.

In many ways it's more than just a change of name, it's also a change of mindset: the add-on manager does not allow add-ons to modify files AT ALL. I'm not just removing the functionality from the existing package manager, I'm actually implementing a whole new branch of code to replace it, every aspect is being gutted, torched and rebuilt. It means you're never trying to break old habits, you start out by learning better ones from the word go. It also means that SMF mods will have to be rewritten, but honestly, that's a blessing rather than a curse.

No permissions issues where you have to open up all your files to higher permissions than they needed. You'll even be able to add and remove packages simply by uploading folders and removing them, without risking it just breaking randomly - but you'll have to visit the admin panel to enable it, of course.

It's also much smarter: instead of this version emulate madness and tying it to versions, the process is much closer to feature detection - add-ons declare the facilities they need to be able to use, and if those needs are met, it can be activated. (Add-ons can even, if they so wish, declare that they provide certain facilities, and other add-ons can indicate they want to use them, so you can build add-ons that have implicit dependencies)

Also if a plugin has specific requirements such as obscure PHP extensions, these can be indicated in the package itself preventing installation without them.

Naturally, all this stuff will be available through whatever we come up with as an add-on repository, so it becomes much clearer as to what's needed and what works with what.

Just for an encore, the add-on management will be able to figure out what languages are supported in an add-on, so we can also display that on the add-on repo, as well as displaying it in the core.


Add-ons will live in their own folder, which I expect to call Addons (and removing the old Packages folder), one folder per add-on. That way, a plugin's functionality is self-contained rather than filling up the Sources and Themes/default/languages folders with stuff.

Now, all this sounds wonderful, too good to be true in fact... except it isn't. It's not only workable, but a slimmer, less refined version is even built in to SimpleDesk 2.0 and has been since I prototyped it a year ago. I've learnt some lessons since then, some refinements to that design, and some of the changes we've made in Wedge make it possible to really do it justice.


I won't get into the innards right now, other than that Modifications.*.php files will be disappearing, that the add-ons still use XML to relate their details, much like package-info.xml but nicer, and that it'll have more in common with WordPress' plugins area than SMF's package manager.

I'll release a few more details once I'm comfortable and can show you a bit more about how it works.
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



Re: Package Manager, how we won't miss thee
« Reply #3, on June 22nd, 2011, 06:48 PM »
The awesome in this astonishes me. A lot like Drupal, eh?

I'd love to hear more about it. I'm not a great developer but reading about this made me want to dive into it.

Re: Package Manager, how we won't miss thee
« Reply #4, on June 22nd, 2011, 07:20 PM »
Quote from RvG on June 22nd, 2011, 06:23 PM
Too much tease eh... any sample pic? :P
No picture since I'm still working on the internals, but it's not exactly pretty ;)

Yes, a bit like Drupal, just not nearly so anal-retentive. Developing for Drupal isn't so much a hobby, more somewhere between a career and a vocation.




Re: Package Manager, how we won't miss thee
« Reply #8, on June 22nd, 2011, 07:43 PM »
Quote from RvG on June 22nd, 2011, 06:23 PM
Too much tease eh... any sample pic? :P
Even I don't get to see a preview, eheh ;)
But I trust that Pete will impress us once again. I always found it too bad that his skills were applied to a mod that has a relatively niche target (SimpleDesk), so it's great to see that whatever Pete developed in his time on SD can be of benefit to Wedge as well :)

Oh, BTW, Pete calls them Add-ons but I insist on "Extensions" in the French versions, and "plugins" or "mods" in my casual English posts. Don't bother, it's just that I'm not much into the word "Add-ons", but for what it's worth, it could be called "Rectums" that I wouldn't mind, as long as it's just great :P
Re: Package Manager, how we won't miss thee
« Reply #9, on June 22nd, 2011, 07:48 PM »
Quote from Arantor on June 22nd, 2011, 07:30 PM
Odd, so it does, how odd.
Hmm, I hardcoded the order to be chronological when I created the Feature blogs.
Technically, it seemed like the best way to do it.

I added an 'exception' to the Dev Blog, so it should work now.

Re: Package Manager, how we won't miss thee
« Reply #10, on June 23rd, 2011, 12:08 AM »
Yes, I poured an awful lot of time into SD, because my own needs needed it, but I learned a very large number of lessons from it, and all of the add-ons design is emerging either directly out of SD code, or things I learned from it.

When I get back to my desktop, I'll upload a screenshot from SD's plugin manager which is the closest to a preview that I can give; right now figuring out all the mechanics was more important.




Re: Package Manager, how we won't miss thee
« Reply #14, on June 24th, 2011, 12:50 AM »
If we're going to do that, are we going to do the whole shebang, of giving users an SVN repo to put their plugins in and be auto-built from that?

Re: Package Manager, how we won't miss thee
« Reply #15, on June 24th, 2011, 01:01 AM »
It would be nice if the plugin repo was a bit better laid out than the SMF one.

If I'm being vague it's because there are a lot of problems with it as it is currently. x]

EDIT: One thing that could be done better is search with multiple factors, tags.