Posted by david on 22 September 2017 at 1:59 am

I've been working to merge blocks into the plugins app and therefore instances and groups will be part of plugins. Blocks will no longer be called blocks, they just fall into the different plugin categories. Groups will become open to any plugin type, whether they require instances or not. 

I bounced back and forth trying to decide what to do with the blocks app. I guess the Xaraya dev in me wanted to keep it as a namesake. I eventually decided everything that is hooked internally should be a plugin, so blocks are going away. The whole point of the changes is to allow external hooks and use the services module for those. Moving blocks and the dashboard to plugins also cuts down on how much code is required to run the backend, since services, blocks, and plugins basically do the same thing in different ways.

Groups will work the same way they do now, except they will reference hooks from plugins instead of the blocks tables. This reduces database queries as well. The only difference between calling hooks for a group and an app will be referencing a group instead of an app, therefore groups can be displayed anywhere like before. Like blocks now, plugin instances will be assignable to multiple groups simultaneously. 

I'm hoping the merger makes it easier to build apps and plugins, while reducing how many APIs are required to work with. If nothing else, it will reduce the database load and increase efficiency within the code. It also simplifies the privileges table and allows privileges to be implemented more consistently, which is better for security. Finally, it gets rid of the choice of whether something should be a block or a plugin. A lot of work, but I'm already seeing the payoff just from an administrative standpoint.


Log in to comment

No comments yet!