Add Plugin Builder to JCB #436

Closed
opened 2019-07-06 15:44:17 +00:00 by Llewellyn · 7 comments
Owner

Steps to reproduce the issue

I want to add the option to build plugins related or linked to components in JCB

Expected result

That you in JCB can map a fully functional plugins

Actual result

Feature Request.

Additional comments

It will be able to target any event in any plugin group, and when compiling the component it will also compile the plugin and auto generate a combined package.

Should you have some ideas, please share them here!

### Steps to reproduce the issue I want to add the option to build plugins related or linked to components in JCB ### Expected result That you in JCB can map a fully functional plugins ### Actual result Feature Request. ### Additional comments It will be able to target any event in any plugin group, and when compiling the component it will also compile the plugin and auto generate a combined package. Should you have some ideas, please share them here!
peterpetrov commented 2019-07-06 18:35:33 +00:00 (Migrated from github.com)
Author
Owner

With regards to the plugins i would like to suggest few ideas. I am pretty sure you already planned them but just to outline them here:

  1. To add a plugin to component you will go to JCB -> Joomla Components -> Plugins tab. Plugin selection to be similar to the Site and Admin views.

  2. Plugin name convention seems tricky and you might want to add plg_[component]_pluginname so just in case you will not overwrite something with the same name.

  3. When creating the plugin to be able to add fields to it. There is a learning curve for us here.

  4. Maybe radio button to select from plugin types that are already available in the joomla instance (i.e. authentication, installer etc.) or select custom type - then the name will have to be in relation to whatever type the developer will need.

With regards to the plugins i would like to suggest few ideas. I am pretty sure you already planned them but just to outline them here: 1. To add a plugin to component you will go to JCB -> Joomla Components -> Plugins tab. Plugin selection to be similar to the Site and Admin views. 2. Plugin name convention seems tricky and you might want to add plg_[[[component]]]_pluginname so just in case you will not overwrite something with the same name. 3. When creating the plugin to be able to add fields to it. There is a learning curve for us here. 4. Maybe radio button to select from plugin types that are already available in the joomla instance (i.e. authentication, installer etc.) or select custom type - then the name will have to be in relation to whatever type the developer will need.
Author
Owner

Sounds good... I have already build a few new views for the JCB component that will be used to build a plugin, and yes I do cover all of those things you mentioned and more.

Again like the admin and site views... the plugin is build so that it also has fields that load from other tables so the developer can add his own to expand the available options. So some of these are:

The functions in each plugin, the plugin groups, the plugin class to inherit from... and more. So I am trying to make it as open and liberal as possible to reach as much possible use case.

This whole idea is also going to expand into the actual improvement of the JCB compiler to give you the developer/user of JCB the option to change improve (for Joomla 4) and add your own MVC for components. So the plugin feature will serve as a pilot for the idea of having all the code in the GUI, not just the custom code.

But okay... I should have something ready to look at soon 👍

Sounds good... I have already build a few new views for the JCB component that will be used to build a plugin, and yes I do cover all of those things you mentioned and more. Again like the admin and site views... the plugin is build so that it also has fields that load from other tables so the developer can add his own to expand the available options. So some of these are: The functions in each plugin, the plugin groups, the plugin class to inherit from... and more. So I am trying to make it as open and liberal as possible to reach as much possible use case. This whole idea is also going to expand into the actual improvement of the JCB compiler to give you the developer/user of JCB the option to change improve (for Joomla 4) and add your own MVC for components. So the plugin feature will serve as a pilot for the idea of having all the code in the GUI, not just the custom code. But okay... I should have something ready to look at soon :+1:
marcodings commented 2019-07-08 17:13:08 +00:00 (Migrated from github.com)
Author
Owner
reuse opportunity https://github.com/joomla-extensions/boilerplate
Author
Owner

Okay the first stage of the plugin option has been added, I am not sure if we should ship with the boilerplate, or just give good tutorial of how to load the plugin boilerplate data.

So for your viewing when you open the Joomla Plugins area in JCB there is a button called Get Boilerplate this will then pull the latest boilerplate code from the following repo. Then once you create a Joomla Plugin, you should see some dynamic behavior that loads the correct values in their relationships. I am planning to still add some more options, so please once you have seen what was done so far, give me feedback and suggestions.

The note will explain to you that the connection between components->pluings->compiler has not yet been made. So this is just to see the GUI... and asking is it going to work?

Okay the first stage of the plugin option has been added, I am not sure if we should ship with the boilerplate, or just give good tutorial of how to load the plugin boilerplate data. So for your viewing when you open the Joomla Plugins area in JCB there is a button called `Get Boilerplate` this will then pull the latest boilerplate code from the [following repo](https://github.com/vdm-io/boilerplate). Then once you create a Joomla Plugin, you should see some dynamic behavior that loads the correct values in their relationships. I am planning to still add some more options, so please once you have seen what was done so far, give me feedback and suggestions. The note will explain to you that the connection between components->pluings->compiler has not yet been made. So this is just to see the GUI... and asking is it going to work?
Author
Owner

Yes I will get a better icon... just now saw it is still FedEx boxes... lol

Yes I will get a better icon... just now saw it is still FedEx boxes... lol
Author
Owner

Okay at this point the plugins are being build (you can link many to one component), but still not yet added to the package or zipped. That is the next step I am working on. Please run some test and let me know.

To link plugins in the Joomla Component List view there is a new icon that looks like a plug... that is how you link them.
image

This is a major issue that involves many places all over JCB to change... since it needs to be added to the import and export of JCB packages... really a big deal actually. I am just very relieved that we added it to JCB instead of building a new component since JCB makes is so much easier with all its conventions and mostly the power of the compiler... even I am amazed a how little I need to add to make this work.

Okay at this point the plugins are being build (you can link many to one component), but still not yet added to the package or zipped. That is the next step I am working on. Please run some test and let me know. To link plugins in the Joomla Component List view there is a new icon that looks like a plug... that is how you link them. ![image](https://user-images.githubusercontent.com/5607939/62430231-00163980-b71a-11e9-9617-c557704e767c.png) This is a major issue that involves many places all over JCB to change... since it needs to be added to the import and export of JCB packages... really a big deal actually. I am just very relieved that we added it to JCB instead of building a new component since JCB makes is so much easier with all its conventions and mostly the power of the compiler... even I am amazed a how [little I need to add to make this work](https://github.com/vdm-io/Joomla-Component-Builder/commit/7d2cc2c9f0b897ef1aac386eff89d37572a1165a).
Author
Owner

Just a heads-up the plugin being build is left in the compiler folder in the admin area of JCB.

Just a heads-up the plugin being build is left in the compiler folder in the admin area of JCB.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#436
No description provided.