-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins: Discussion of design #306
Comments
I don't have enough knowledge about this type of questions so I can't really help. But it is an important topic that should probably be discussed. Also, I really liked the fact that loading my notes was super fast (<1s) so I would always recommend personnally to put that in front instead of plugins. |
is it necessary to introduce all these concepts from the beginning? I don't know if for example sibling plugins can be supported later on? I am really missing my admonitions in Boost Note, that should be a small and easy plugin to start with. |
TLDR: Plugin interaction can have side affects. Basic plugin system would be a good start.
A plugin might encompass direct Dropbox Sync support.
Something as important as synchronization might be important for someone who accesses their notes across devices (but isn't using the proprietary cloud storage).
How plugins should interact, and what limitations/responsibilities they should have, are crucial to the foundational architecture of a plugin system. |
I agree with this idea. We need to plan out this plugin architecture as soon as possible otherwise the app will need to be restructuring and that could cost a lot of time. That's why I open an issue when this repo was first back in development: #48
|
NPM and Composer use semantic versioning. I think it'd be good to follow through to base any plugin versioning on the this same system.
|
Yeah good ideas. Another way of installing the plugin is via If we were going to allow sibling plugin then we have to support a kind of mechanism to prevent a plugin from being removed if another plugin is depending on it. |
What I'm thinking is like this. https://github.com/denoland/deno_website2/blob/master/src/database.json A single repository(should be this repo) will have a file like the |
I like the database option. And if it pulls from the Release's page, that would be ideal. It alleviates the need for calling One of my projects has a sort of permissions controller. Making sure an action can be taken, before it actually is. An example of a negative scenario that might be preventable.
I don't think it's impossible to prevent a plugin from accessing any part of the application, and intentionally breaking the user's experience. But the idea is that the plugins will be made to enhance the users experience, so hopefully the plugin would be written with good-intentions in mind.
If a basic application interface was created to give access points for plugins to work with, it would allow for plugins to safely communicate to the application, without inadvertently breaking anything. Similarly, each plugin should be required to implement a common interface expected by the note application, so that basic communication can exist, such as version checks and the like. Here's where I may be "tool shedding" Even with a basic application API for which plugins can interface, it could still allow a plugin too much access. Using the Plugin list, adding another attribute for permissions would allow the application to grant specific or a collection of methods to the plugin. Specific Boostnote Module/Libconst init = () => { doThings(); };
const make = (cupSize) => { return brewCoffee(cupSize); };
const drink = (coffee) => { carefullySip(coffee); };
export default {
init,
make
}; Boostnote-defined Permission List for API.
{
"coffee": [Coffee.init],
"coffee.make": [Coffee.init, Coffee.brew],
"coffee.drink": [Coffee.drink]
} And taking from @Rokt33r's database.json example{
"abc": {
"type": "github",
"owner": "zhmushan",
"repo": "abc",
"desc": "A better Deno framework to create web application",
"perms": ["coffee.make"]
}
} The benefit of this structure, is that as long as the Plugin interfaces only through the API, they would be limited to the permissions designated. |
Correction, the permissions shouldn't point to a specific |
Sorry I'm late to the party..... The "Central API", as mentioned in #48, is key. All the core features should be plugins based off the Central API. That's how VS Code does it:
|
@RonWalker22 Thanks for the information. I guess I should try to make some VSCode plugin and figure out how how should we present DX. |
Plugins: Some want them, all need them [see your local physician for details]
I think plugins could help expand and encapsulate functionality in the new application.
If one user wants charts, and another wants WordPress sync support, then all users should not be subjected to load time and functionality where not desired. For if one JS function fails, it could at least disrupt other functionality.
This begs the question of how to design, implement, and assign responsibility for various plugins.
The foundation of a plugin system needs to consider numerous points of conflict of views, and enable independent plugins that can share resources, whilst not disabling another (except where dependencies lay).
I myself have my own considerations, but this issue is to open a topic for other's points of view to declare their thoughts.
The text was updated successfully, but these errors were encountered: