The last new aspect of ocPortal 4, it's division into optional addons, is now completed ready for the next beta. We mentioned the new addon architecture back when we first announced version 4's features, but we didn't say much more. We've held off finalising it until now because we didn't need it to start off beta testing, and it was a fairly tricky thing to design.
The purpose of this new addon architecture is to cut down bloat- we love that ocPortal has lots of features, but we feel that has also been a bit of a problem in the past. It meant there was a lot:
to hack out from templates
to get in the way
In order to make sure ocPortal stays feature-rich, but also act lightweight, we have made large parts of it optional. Outside ocPortal's core set of addons (which are locked down and invisible), exist the following optional ocProducts addons:
All the optional addons are installed when you install ocPortal, so nothing has changed from that perspective. The big change is that these addons now all show up on the addon management screen and you can uninstall them. Uninstalling them removes the modules in the addons, clears the database content/structure, and removes the files.
This all seems quite straight-forward, but the trickiest part was making sure that two important concerns were met:
You need to be able to easily reinstall the addon. An addon that was uninstalled would have originally came from the ocPortal installer – we didn't want a situation where we asked people to come download those addons from our website if they wanted them back. That would have presented a confusing situation, of addons existing in both the installer, and our own addon directory, and also a maintenance and versioning nightmare.
You need to be able to run a single upgrade to upgrade all addons on the site. Again, it would be a maintenance and versioning nightmare if the addons were all separately maintained. Crucially though, the upgrader must not place files that belong to addons that have been uninstalled.
Our solution to this is simple to explain, and complex for us to implement:
When an ocProducts addon is uninstalled it will now be packaged up into an addon TAR, exactly like the third-party addon TARs ocPortal already supported. This TAR file remains in the exports/mods directory and you can reinstall it at any point using the addon management interface.
When an upgrade is performed, ocPortal will check whether each file in the update should be copied to the website file system, and/or whether it has to be placed within one of the TAR files residing in the exports/mods directory (i.e. it will keep the addon TARs up-to-date).
One offshoot from all this is we've had to streamline our upgrade process. The news announcements and upgrader script now together set out a clearer standard path for upgrading. If you've uninstalled official addons it's now required (well, strong recommended) to use the upgrader script to extract the TAR files (by feeding it the upgrade TAR URL in the news posts we make). In light of this we've improved our upgrader script to make sure this will work smoothly.
If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
1 guests and 0 members have just viewed this: None