插件开发人员需要为我的应用程序提供哪些信息?

时间:2021-04-18 17:18:22

I am developing an application that can be extended using "plug-ins". The plug-ins will be pretty basic, allowing developers to add new "actions" to my application.

我正在开发一个可以使用“插件”扩展的应用程序。这些插件非常基础,允许开发人员为我的应用程序添加新的“操作”。

What documentation/information do I need to provide so that developers can do what they need to?

我需要提供哪些文档/信息才能使开发人员能够满足他们的需求?

I was thinking a short example and a general overview of how the application/plug-ins work?

我在想一个简短的例子,以及应用程序/插件如何工作的一般概述?

3 个解决方案

#1


You need to foster a sense of community. Things like:

你需要培养一种社区意识。像:

  • sample code for more than one real plugin;
  • 多个真实插件的示例代码;

  • a getting started guide for plugin writers;
  • 插件编写者入门指南;

  • details on how to deploy a plugin and on how they are discovered by your application;
  • 有关如何部署插件以及应用程序如何发现插件的详细信息;

  • a wiki so that plugin writers can collaborate, and
  • 一个wiki,以便插件编写者可以协作,以及

  • an easy way for plugin authors to contribute their plugin
  • 插件作者贡献插件的简便方法

might help.

#2


You also have to decide how detailed your API is going to be. IF you are offering a rich API, make sure to document it well, and to explicitly highlight directives (explicit "do" or "don't do" instructions).

您还必须决定API的详细程度。如果您提供丰富的API,请确保记录良好,并明确突出显示指令(显式“执行”或“不执行”指令)。

Most users will not bother to read the documentation and figure out things from the name, or skim your docs. So it is best if you can avoid "surprising them", and if not, at least offer them a chance to find the problems.

大多数用户都不会费心阅读文档并从名称中找出内容或浏览文档。所以最好是你可以避免“让他们感到惊讶”,如果没有,至少让他们有机会找到问题。

Finally, err on the side of caution with checking correct use and send exceptions rather than counting on users meeting your instructions.

最后,谨慎一点,检查正确使用并发送异常,而不是依靠满足您指示的用户。

#3


Also, think very well in advance on whether you truly expect anyone to use your plug-ins because the core product becomes a "hit".

此外,请提前考虑是否真的希望任何人使用您的插件,因为核心产品会成为“热门”。

It is very common to err on the side of optimism, and think that when you are writing a plug-in infrastructure that somebody will actually use it.

在乐观方面犯错是很常见的,并且认为当你编写插件基础设施时,有人会真正使用它。

However, nobody is likely to write plugins before the core out-of-the-box offering is successful and popular. You may be better off publishing and distributing your own plugins before worrying about extensions by others.

但是,在核心开箱即用产品成功且受欢迎之前,没有人可能会编写插件。在担心其他人的扩展之前,您最好先发布和分发自己的插件。

#1


You need to foster a sense of community. Things like:

你需要培养一种社区意识。像:

  • sample code for more than one real plugin;
  • 多个真实插件的示例代码;

  • a getting started guide for plugin writers;
  • 插件编写者入门指南;

  • details on how to deploy a plugin and on how they are discovered by your application;
  • 有关如何部署插件以及应用程序如何发现插件的详细信息;

  • a wiki so that plugin writers can collaborate, and
  • 一个wiki,以便插件编写者可以协作,以及

  • an easy way for plugin authors to contribute their plugin
  • 插件作者贡献插件的简便方法

might help.

#2


You also have to decide how detailed your API is going to be. IF you are offering a rich API, make sure to document it well, and to explicitly highlight directives (explicit "do" or "don't do" instructions).

您还必须决定API的详细程度。如果您提供丰富的API,请确保记录良好,并明确突出显示指令(显式“执行”或“不执行”指令)。

Most users will not bother to read the documentation and figure out things from the name, or skim your docs. So it is best if you can avoid "surprising them", and if not, at least offer them a chance to find the problems.

大多数用户都不会费心阅读文档并从名称中找出内容或浏览文档。所以最好是你可以避免“让他们感到惊讶”,如果没有,至少让他们有机会找到问题。

Finally, err on the side of caution with checking correct use and send exceptions rather than counting on users meeting your instructions.

最后,谨慎一点,检查正确使用并发送异常,而不是依靠满足您指示的用户。

#3


Also, think very well in advance on whether you truly expect anyone to use your plug-ins because the core product becomes a "hit".

此外,请提前考虑是否真的希望任何人使用您的插件,因为核心产品会成为“热门”。

It is very common to err on the side of optimism, and think that when you are writing a plug-in infrastructure that somebody will actually use it.

在乐观方面犯错是很常见的,并且认为当你编写插件基础设施时,有人会真正使用它。

However, nobody is likely to write plugins before the core out-of-the-box offering is successful and popular. You may be better off publishing and distributing your own plugins before worrying about extensions by others.

但是,在核心开箱即用产品成功且受欢迎之前,没有人可能会编写插件。在担心其他人的扩展之前,您最好先发布和分发自己的插件。