-
Notifications
You must be signed in to change notification settings - Fork 8
Implement plugins manager structure #148
Comments
With this pattern, we need strong documents. Do you have a plan to import new event names for custom sub-system now? |
@mojtaba-naseri, unfortunately I have no plan for new component or sub-system what developers create, but I added it as a TODO for re-search in first post |
If we prepare extra arguments to implement dependencies and priority to load plugins can be helpful, for example:
|
In Ejabberd modules there is a callback function [{another_module, hard}, {foo_module, soft}]
And the module manager system makes a direct graph for modules to start them here. |
@pouriya Thank you, it is an excellent idea and solution. This makes developers more organized and also gets more information from a plugin. Infrastructure (plugin system manager) can also be more secure when running a product. I added this guidance to first post's TODO list. Sincerely yours. |
@iArazar I will consider high-priority of plugins output |
you mean the |
Thank you @pouriya, I think
Thank you again for all your efforts, I am appreciated. |
In the first phase, about 32 events were selected from Joomla!; it is without MishkaCms custom events. Updated, some events were deleted @spec system_events :: [event]
def system_events do
[
# Content
%Event{name: :on_content_prepare, section: :mishka_content, reference: Ref.OnContentPrepare},
%Event{name: :on_content_after_title, section: :mishka_content, reference: Ref.OnContentAfterTitle},
%Event{name: :on_content_before_display, section: :mishka_content, reference: Ref.OnContentBeforeDisplay},
%Event{name: :on_content_after_display, section: :mishka_content, reference: Ref.OnContentAfterDisplay},
%Event{name: :on_content_before_save, section: :mishka_content, reference: Ref.OnContentBeforeSave},
%Event{name: :on_content_after_save, section: :mishka_content, reference: Ref.OnContentAfterSave},
%Event{name: :on_content_prepare_form, section: :mishka_content, reference: Ref.OnContentPrepareForm},
%Event{name: :on_content_prepare_data, section: :mishka_content, reference: Ref.OnContentPrepareData},
%Event{name: :on_content_before_delete, section: :mishka_content, reference: Ref.OnContentBeforeDelete},
%Event{name: :on_content_after_delete, section: :mishka_content, reference: Ref.OnContentAfterDelete},
%Event{name: :on_content_change_state, section: :mishka_content, reference: Ref.OnContentChangeState},
%Event{name: :on_content_search, section: :mishka_content, reference: Ref.OnContentSearch},
%Event{name: :on_content_search_areas, section: :mishka_content, reference: Ref.OnContentSearchAreas},
# Captcha
%Event{name: :on_init, section: :mishka_user, reference: Ref.OnInit},
%Event{name: :on_display, section: :mishka_user, reference: Ref.OnDisplay},
%Event{name: :on_check_answer, section: :mishka_user, reference: Ref.OnCheckAnswer},
%Event{name: :on_privacy_collect_admin_capabilities, section: :mishka_user, reference: Ref.OnPrivacyCollectAdminCapabilities},
# User
%Event{name: :on_user_authorisation, section: :mishka_user, reference: Ref.OnUserAuthorisation},
%Event{name: :on_user_authorisation_failure, section: :mishka_user, reference: Ref.OnUserAuthorisationFailure},
%Event{name: :on_user_before_save, section: :mishka_user, reference: Ref.OnUserBeforeSave},
%Event{name: :on_user_after_save, section: :mishka_user, reference: Ref.OnUserAfterSave},
%Event{name: :on_user_after_delete, section: :mishka_user, reference: Ref.OnUserAfterDelete},
%Event{name: :on_user_login, section: :mishka_user, reference: Ref.OnUserLogin},
%Event{name: :on_user_login_failure, section: :mishka_user, reference: Ref.OnUserLoginFailure},
%Event{name: :on_user_after_login, section: :mishka_user, reference: Ref.OnUserAfterLogin},
%Event{name: :on_user_after_logout, section: :mishka_user, reference: Ref.OnUserAfterLogout},
%Event{name: :on_user_after_save_role, section: :mishka_user, reference: Ref.OnUserAfterSaveRole},
%Event{name: :on_user_after_delete_role, section: :mishka_user, reference: Ref.OnUserAfterDeleteRole}
]
end |
In this time, we tested an event and 2 status of a hook plugin Update new event:%Event{name: :on_user_after_save_failure, section: :mishka_user, reference: Ref.OnUserAfterSaveFailure} |
We separated Elixir system plugin manager to new Repo |
Done! |
After talking to @pouriya, I have decided to research about
ejabberd
plugins manager solutions. Then we stop doing all updates out of our issues and start learning and implementing a basic structure of plugins manager.init
of developer's plugin functions, when server is startedensure_event?
Hook v1libgraph
for dependencies and plugin connections mishka-group/mishka_installer#2db
of pluginsmishka_installer
just includes {mishka_database, mishka_translator} #168depends
callback, based on Implement plugins manager structure #148 (comment)API
side with conn output #164HTML
side with socket output #165Jalaali
Initial diagram
Talks:
Refs:
The text was updated successfully, but these errors were encountered: