Creating a new plugin
Last updated
Was this helpful?
Last updated
Was this helpful?
Creating a new plugin is a fairly straight forward process: For the purpose of this example, let's call our new plugin for customers plugin, to handle a list of customers, with a simple object structure. All plugins consist of a base nuget, which is going to contain database structure and constants.
Create a repository for your plugin in lowercase and each word seperated by "-" eg.:
Create a repository for the nuget base of your plugin eg.:
The base which is going to be a nuget, needs to follow this pattern:
A console application project called DBMigrator, with reference to the Microting.eFormBaseCustomerBase project.
A class library called the name of your base, eg.: Microting.eFormBaseCustomerBase
.travis.yml for testing, modify this to fit your base
upgradeeformnugets.sh for upgrading Microting.eFormApi.BasePn and Microting.eForm
The Microting.eFormBaseCustomerBase project needs to have the following folder structure:
Infrastructure
Data
See the basecustomer project for reference.
Keynotes to have in mind, is that every entity needs to enherit from the BaseEntity and they need to have a Versioned equivalent of the class. Each Entity needs to implement the following methods:
public async Task Create(CustomersPnDbAnySql dbContext)
public async Task Update(CustomersPnDbAnySql dbContext)
public async Task Delete(CustomersPnDbAnySql dbContext)
private CustomerVersion MapVersions(CustomersPnDbAnySql dbContext, Customer customer) ^ replace CustomerVersion and Customer customer with the respective class names for your entity.
The repository needs to have the following folder structure/files.
src
app
plugins
modules
Plugins
Data
Seed
See the customers project for reference.
This is to ensure that all entities used in the ecosystem conforms to the same standard. See for reference.
(for the angular part of the plugin)
(for the End 2 end tests)
(for the actual TypeScript for the plugin)
(for the C# part of the project)
for testing
for upgrading Microting.eFormApi.BasePn, Microting.eForm and Microting.eFormBaseCustomerBase
for installing the route for the TypeScript part into main frontend project
for installing the plugin into the main project
for getting changes back to the repository, when changes have been done to the plugin in the main project.