如何设计可扩展软件(插件体系结构)? [英] How to design extensible software (plugin architecture)?

查看:215
本文介绍了如何设计可扩展软件(插件体系结构)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些资源来谈论如何将软件设计为可扩展的,即让其他人可以编写可为其添加功能的附件/插件.

I need some resources that talk about how to design your software to be extensible, i.e. so that other people can write add-ons/plug-ins that adds functionality to it.

您推荐什么?有没有讨论该主题的书?
我希望简短而切合实际的东西;一些理论和一些具体示例.

What do you recommend? Any books out there that discuss the subject?
I would prefer something that's short and to the point; a bit of theory and a bunch of concrete examples.

我没有针对特定的语言,我希望能够理解核心思想,以便可以使用任何语言来实现它.

I'm not targeting a specific language, I want to be able to understand the core idea so that I can implement it in any language.

出于同样的原因,我更喜欢不要使用其他人构建的框架(除非该框架不是非常高级,即不会太多隐藏 )现在,我只想对这个主题进行自我教育,并尝试各种实现方式.另外,框架通常假定用户对主题的了解.

And for the same reason, I prefer not to do it using a framework that someone else built (unless the framework is not very high-level, i.e. doesn't hide too much), at the moment I only want to educate myself on the subject and experiment with various ways to implement it. Plus, a framework usually assumes user's knowledge about the subject.

更新

我不是在问OOP,也不是在允许我的类被继承.我说的是设计一个将要部署在系统上的应用程序,以便在部署后可以由第三方附加组件对其进行扩展.

I'm not asking about OOP or allowing my classes to be inherited. I'm talking about designing an application that will be deployed on a system, such that it can be extended by third-party add-ons AFTER its been deployed.

例如,Notepad ++具有一个插件体系结构,您可以在其中将.dll文件放置在plugins文件夹中,并为不存在的应用程序添加功能,例如选色或代码段插入,或许多其他事情(广泛的功能).

For example, Notepad++ has a plug-in architecture where you can place a .dll file in the plugins folder, and it adds functionality to the application that wasn't there, such as color-picking, or snippet insertion, or many other things (a wide range of functionality).

推荐答案

如果我们正在谈论.NET,请尝试在CodeProject上使用VBScript 编写.NET应用程序脚本.那里有很多具体的例子.

IF we're talking .NET, try Scripting .NET applications with VBScript over on CodeProject. Lots of concrete examples there.

下面是实施各种应用程序扩展技术的网站

Below are sites implementing various application extension techniques

  • ClearScript - Makes V8, VBScript and JScript available to .NET apps
  • CS-Script - The C# Script Engine
  • Plugin Architecture using C#
  • Opinio plugin architecture
  • Notes on the Eclipse Plug-in Architecture
  • Plug-in Architecture Framework for Beginners
  • Gecko plugin architecture
  • Fungimol plugin architecture

这篇关于如何设计可扩展软件(插件体系结构)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆