Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- What is your product version?
- What is your product type (Angular or MVC)?
- What is product framework type (.net framework or .net core)?
- .NET Core
If issue related with ABP Framework
- What is ABP Framework version?
If issue is about UI
- Which theme are you using?
- What are the theme settings?
I have read the following article:
Which shows a very clean way of extending an application through the use of Plugins, however, the example seems to be limited to "backend" functionality, i.e. to provide the ability to do "work" on the application, in this case to provide a background worker to clear out the database.
Is it also possible to allow the extension of the UI for the application via a Plugin? If so, are there any examples of doing this?
We would like to be able to provide the core application to people, and then to allow the inclusion of a number of plugins. These plugins would contain additional UI (web pages) and application functionality.
Is this possilble?
If not possible out of the box, would there be any reason that we couldn't extend using something like ASP.NET Application Parts:
Do you know of any examples of using an Application Part to extend an ASP.NET Zero project?
Thanks in advance! Gary
Yes, it is possible to have UI specific code in your Plugin modules but unfortunately we don't have an example about it. You can mark resources like JS, CSS and CSHTML files as embedded resourses in your Plugin modules. You can also use Application Parts which is also supported.
@ismcagdas thanks for getting back to me about this, I really appreicate it!
Do you have any plans to create a sample application that shows how this can be achieved? What I would like to achieve is to have a Plugin created, that once installed, brings with it, navigation menu items (to add to the main navigation menu), permissions, Views, etc, for a new section of the website.
@ismcagdas that is great news!
I would be more than happy to take any rough drafts or notes related to the article for a spin to test things out, and to provide feedback.
Would you have any rough tips/guidance on top of what you have already mentioned that I might be able to start with?
Sorry for my late reply. This feature was added long time ago, https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1812. It seems like it is not documented and I couldn't remember how to use it. However, I will try to prepare a document during the week.
Sorry, I couldn't have time yet althoug promised to work on this a month ago. However, I just found that we already have a document about this case. You can check it and I think it will help you to proceed on what you need https://aspnetboilerplate.com/Pages/Documents/Embedded-Resource-Files
Thank you for providing this link, this looks like it will be really helpful!
I have tried to go through what is described, and I "think" I have done everything, but when I try to access the new route that I have defined, I get the following error message:
An unhandled exception occurred while processing the request. ComponentNotFoundException: No component for supporting the service EmbeddedPlugin.Controllers.ApprovalController was found Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, bool ignoreParentContext)
Is there something else that needs to be done here? Is there a complete sample available that shows an embedded plugin?
This is the structure that I am trying to follow:
Do you have any advice on how an Embedded Plugin would add itself into the navigation structure for the overall application? In addition, what would be the correct way for an Embedded Plugin to bring its own permissions and settings, to allow configuration of the different parts of the plugin, in the same way that you can control settings and permissions for the main application.
Thanks again for all your help so far, it has been really helpful!
I have created a sample project, you can check it out on https://github.com/aspnetzero/aspnet-zero-samples/tree/master/PluginDemo-MPA.
The problem you are facing is because you don't have this line https://github.com/aspnetzero/aspnet-zero-samples/blob/master/PluginDemo-MPA/src/PluginDemo.Embedded.Web/Startup/PluginDemoEmbeddedWebModule.cs#L45 in your project.