Jump to content
primeval_god

Plugin Request: Developers Example

6 posts in this topic Last Reply

Recommended Posts

Hello all, I wanted to put this request out to the wonderful developers here in our community. I have toyed from time to time with the idea of developing or contributing to plugin development for unRAID. Every time I consider it however i end up put off by the lack of clear concise documentation. I am a programmer by trade, but I am a noob when it comes to many if the languages and concepts used in the unRAID plugin system. With that said i would like to see an example plugin that clearly demonstration how a plugin should be structured and how to do the basic things a plugin does, hopefully will judicious commenting. I envision something that covers most of the basics like, adding a settings page, adding a page/tab to the main interface, modifying or inserting something into an existing page (if possible), including a binary package, requiring a binary package from nerdpack (that is a thing right?), running a script on command (button press), registering a script to run on a particular system event (array startup?), persisting settings across reboot, adding help text, interacting with another plugin or system plugin (like dockerman). I also would really like to see a detailed readme with requirements and step by step instructions for building and packaging the plugin for distribution.

 

I know this is a lot to ask but i think in the long run it could be of great benefit to our community. I myself would be extremely grateful, and would be willing to eventually repay the community in development contributions.

Share this post


Link to post

I know this isn't what you want to hear, but I recommend reverse engineering one or more of @Squid's plugins.

 

One of the main issues with doing what you said, is that the target is constantly moving. If you get it figured out and documented correctly today, I can pretty much guarantee you your work will be mostly useless in a year.

 

That being said, if you want to take on the project, it would be extremely valuable if it were kept up to date.

Share this post


Link to post

I realize that it is a moving target, and that is the reason for lack of documentation, which is why i thought this might be a slightly easier way of providing a starting point. At least with an example plugin it is immediately obvious that it no longer compiles/runs when something changes. And unlike forum posts its changes are version controlled.

 

As for reverse engineering I have tried that in the past and not gotten very far. That is partly the motivation for an example plugin. When reverse engineering a plugin you need to be able to figure out what is being done and how it is being done. The idea of an example plugin is that the what is being done part is very clearly spelled out, making it easier to understand the how. I would be more than happy to assist with ongoing maintenance once i understand the architecture. 

Share this post


Link to post

I'm in the same boat as @primeval_god. I've looked at a couple different plugins to reverse engineer, but I'm not clear on the basic architecture from which it all starts. It means I end up guessing at what is going on, and getting frustrated in the process. For something I'm doing in my spare time, it's not encouraging.  I still tinker at it from time to time, but the lack of documentation of almost any kind is a huge stumbling point right out of the gate.

The moving target problem is an excuse in my opinion. Web application development is radically different today than 2 years ago, yet basic documentation abounds.

Share this post


Link to post
On 8/3/2018 at 1:21 PM, jonathanm said:

but I recommend reverse engineering one or more of @Squid's plugins.

Personally, I'd reverse engineer one of the dynamix plugins.  It's what I did :)

 

On 8/3/2018 at 12:35 PM, primeval_god said:

With that said i would like to see an example plugin that clearly demonstration how a plugin should be structured and how to do the basic things a plugin does, hopefully will judicious commenting.

https://lime-technology.com/forums/topic/33322-how-does-the-plugin-system-work-documentation-added-wip/

 

On 8/3/2018 at 12:35 PM, primeval_god said:

instructions for building and packaging the plugin for distribution

Million different ways to accomplish this.  Most of the authors here use tarballs.  Look at a .plg file

 

On 8/3/2018 at 4:01 PM, whipdancer said:

basic architecture from which it all starts

Its all the .page file   

 

On 8/3/2018 at 4:01 PM, whipdancer said:

but the lack of documentation of almost any kind is a huge stumbling point right out of the gate

Fair point, but you've also got to consider that there are very few active plugin authors, 

 

@bonienl, @dmacias, @dlandon, along with myself.  Most applications are recommended to be handled via a docker container.  Limetech and bonienl are very helpful when we run into a problem.

 

But, the documentation is all there.  It's just scattered throughout the Programming / Plugin System board, along with the comments on a few of the files within unRaid itself.

Share this post


Link to post

I literally just struggled through exactly this, but was able to come through the tunnel to the light on the other side. I will put together a blog boat and share.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.