question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The mechanism for plugins has proven a generally useful way to separate the concerns of your app into separate modules.

If for example, you are writing an admin interface for a blogging platform, you might want to separate your code into auth, posts, comments, et c modules, containing the state, actions, events relevant to each respective topic.

By exposing each module’s state, actions, events as a plugin, it becomes very convenient to bring them together in a single app using app({ ... plugins: [auth, posts, comments], ...})

However, the word “plugins” implies it is only meant for more general, reusable things. Not as a way to structure your app. Therefore, I move that the name “plugins” be changed to something else. The question is what?

Either, we find a suitable noun, such as “modules” (except “modules” might cause some confusion), or, perhaps we don’t hard-code a name into hyperapp, and instead declare the plugins with a verb, such as: app({ ... compose: [auth, posts, comments] ...}). Other options, besides “compose”, might be “include” or “merge”.

If we go the “verb” route, we’ll still need a noun to use instead of “plugins”, for docs and discussions. But we’re more free to use a longer, descriptive name, like “hyperapp-modules” for example.

At the moment, I think my vote is on: app({ ... include: [foo, bar] ...}) and calling the includees “hyperapp-modules” in the docs

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:28 (27 by maintainers)

github_iconTop GitHub Comments

5reactions
SkaterDadcommented, Apr 21, 2017

I take it back. プラグイン appears to be 15 bytes, so that’s a big penalty compared to “plugins” or “mixins”.

2reactions
selfupcommented, Apr 18, 2017

I would prefer mixins for this 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename Plugins Folder - WordPress.org
Hi Jose,. If I install your plugin and rename the plugins folder, am I able to then de-activate or delete the plugin. Will...
Read more >
Simple Rename - Bukkit Plugins - Projects
Rename mobs: Type the desired name, and just right click the mob! Copy and paste: Copy and paste all the meta (name, lore,...
Read more >
EpicRename | SpigotMC - High Performance Minecraft
Want to rename items? or maybe even relore them? ... A server administrator command that provides plugin reload and debug information.
Read more >
How to rename the WordPress plugins folder
How to Rename the WordPress Plugins Folder · 1. Log into cPanel · 2. Click on 'File Manager' · 3. Locate the 'wp-config.php'...
Read more >
How to disable a WordPress Plugin by renaming the plugin ...
Log into your File Manager · Navigate to your plugins directory · Right click on the plugin's folder that you want to disable,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found