The type of connection you use depends on the type of application you are building small product or large business application and your specific needs e. The architecture pattern itself does not specify any of these implementation details, only that the plug-in modules must remain independent from one another. The contracts between the plug-in modules and the core system can range anywhere from standard contracts to custom ones.
Custom contracts are typically found in situations where plug-in components are developed by a third party where you have no control over the contract used by the plug-in.
When creating standard contracts usually implemented through XML or a Java Map , it is important to remember to create a versioning strategy right from the start. Perhaps the best example of the microkernel architecture is the Eclipse IDE.
Downloading the basic Eclipse product provides you little more than a fancy editor. However, once you start adding plug-ins, it becomes a highly customizable and useful product. Internet browsers are another common product example using the microkernel architecture: viewers and other plug-ins add additional capabilities that are not otherwise found in the basic browser i. The examples are endless for product-based software, but what about large business applications?
The microkernel architecture applies to these situations as well. Claims processing is a very complicated process. For example, some states allow free windshield replacement if your windshield is damaged by a rock, whereas other states do not.
This creates an almost infinite set of conditions for a standard claims process. Not surprisingly, most insurance claims applications leverage large and complex rules engines to handle much of this complexity. However, these rules engines can grow into a complex big ball of mud where changing one rule impacts other rules, or making a simple rule change requires an army of analysts, developers, and testers.
Connect and share knowledge within a single location that is structured and easy to search. A repeating theme in my development work has been the use of or creation of an in-house plug-in architecture.
I've seen it approached many ways - configuration files XML,. In my experience:. As I seek to learn from the various architectures I've worked with, I'm also looking to the community for suggestions. What was your worst failure or the worst failure you've seen? What would you do if you were going to implement a new plug-in architecture? What SDK or open source project that you've worked with has the best example of a good architecture?
These examples seem to play to various language strengths. Is a good plugin architecture necessarily tied to the language? Is it best to use tools to create a plugin architecture, or to do it on one's own following models? One effective way to make your application extensible is to expose its internals as a scripting language and write all the top level stuff in that language. This makes it quite modifiable and practically future proof if your primitives are well chosen and implemented.
A success story of this kind of thing is Emacs. I can write a 3 line snippet in the current buffer itself, evaluate it and use it. Very smooth learning curve and very pleasing results. One application which I've extended a little is Trac. It has a component architecture which in this situation means that tasks are delegated to modules that advertise extension points.
You can then implement other components which would fit into these points and change the flow. It's a little like Kalkie's suggestion above. Another one that's good is py.
To state this in a different way, one allows plugins to access your application while the other allows your application to access plugins. The distinction is subtle, and sometimes there is no distiction I've read a bit on the way eclipse does things, but nothing more than that.
Yegge's properties blog talks a bit about how the use of the properties pattern allows for plugins and extensibility. Years ago I would create factories, plugin managers and config files to manage all of it and let me determine which plugin to use at runtime. One of the best plug-in architectures that I have seen is implemented in Eclipse. Instead of having an application with a plug-in model, everything is a plug-in.
The base application itself is the plug-in framework. I'll describe a fairly simple technique that I have use in the past. This approach uses C reflection to help in the plugin loading process. An IPlugin interface is used to identify classes that implement plugins. Methods are added to the interface to allow the application to communicate with the plugin.
For example the Init method that the application will use to instruct the plugin to initialize. To find plugins the application scans a plugin folder for.
Net assemblies. Each assembly is loaded. Reflection is used to scan for classes that implement IPlugin. These numbers are not arbitrary. Numerous studies have shown that human beings tend to experience everything that happens within a two-second interval as part of the "now" moment.
If event A and event B happen within two seconds of each other, people perceive those events as being simultaneous. If the events are separated by more than about three seconds, people think there's a delay—they feel that something is "taking too long.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? In this article. Creating a plugin architecture? It sounded hard. An advanced computer science concept, if you will. I mulled over a few different implementations based on software I had previously used. I realized this wasn't a difficult problem.
Like everything else in programming, once we deconstruct the problem into smaller chunks, we can reason about implementation details clearly. We assume things are more difficult than they appear.
This is especially true for problems we have not seen before. Take a step back. Break the problem down into smaller pieces. You got this.
0コメント