How to write "plug-in" app?

0 like 0 dislike
5 views
Then I decided to do a web application is to use plugins. I really do not imagine a form of answer to my question, but perhaps you share links on the subject of "How to write "plug-in" app?" or even, someone will write an article about it on Habr.
by | 5 views

5 Answers

0 like 0 dislike
View in the direction of the MEF and Unity (if we're talking about .net), will create quite a good expandable system.
When viewed from a more General point of view, the "playability" is a rather broad and detailed topic.
Then questions arise: what playability you need?
\r
Whether interaction on the basis of SOA? whether the isolation of the plugins in a separate domain? Can you do a simple structure podlaczenia modules or need to use a message bus? Whether the distinction in levels of trust and, accordingly, a separate API?
Also a question about dependency injection — whether your plugins more separate modules, or they will be tightly integrated into your existing environment (e.g. the plugin is overriding the notification) and it is possible to use DI.
\r
Brief of "to write" can not be here, you need to know the problem and all the nuances.
If we talk just about any framework to ensure playability — read articles about MEF, they are in English, but will give a General idea about one of the possible solutions to the problem.
by
0 like 0 dislike
Create Libu, which provides a common sdk, this is usually a set of abstract classes. Create a class Plugin which contains the necessary entry point usually is init in order for the plugin said that he can load to plug-in started to carry out its features and unload, to discharge. Next, make Manager most of these plugins, which has pointers to all the available plugins, it is already cleaning up what to download and what is not, and resolves things like dependencies between plugins.
To work this bunch will be just as fast as a monolithic application, but each plugin will be the only brick and will be much easier to debug. This kind has little effect on the loading speed of the app (you must still do some extra movements in the runtime) and slightly to the memory footprint. You can organize the exchange opening event between plugins, but it is much easier and faster to make plugins implementations of some interfaces and an exchange event to use only a small part of the plugin where it is really needed.
by
0 like 0 dislike
A view API and docks of any such and 90% of the questions will disappear by themselves.
by
0 like 0 dislike
In the case of Python it is possible to look in the direction of Zope 3 (aka BlueBream) and on trac component architecture, and as an option on extension for mercurial
\r
If briefly to describe them, we get the following:
\rZope 3 is based on the interfaces and adapters, this concept is closer to interfaces in Java, it seemed to me too busy, disappears beauty of a Python;
\rTrac — based on components and extension points, almost every unit is a component of and communicates with the other through extension points, and the component which declares the extension point also defines the interface that must be implemented by the component using it;
\rMercurial allows you to extend the functionality by defining additional commands, other changes in functionals using special hooks (I could be wrong, because I do not studied in detail).
\r
\r
In General, it all depends on the objectives and means by which you want to solve them.
PS Very concerned about such questions, so welcome to the PM.
by
0 like 0 dislike
It all depends on your needs and the breadth of functionality of the plugin. It's best to see how it is implemented in opensorse solutions, for example, can advise and FireFox extensions in XUL, as an example of a fairly flexible way to change the functionality of the application.
\r
Also, it should look in the direction of the pattern Observer", which will facilitate scalability.
by

Related questions

0 like 0 dislike
4 answers
asked Mar 28, 2019 by ASP
0 like 0 dislike
3 answers
asked Jun 11, 2019 by noob1
0 like 0 dislike
3 answers
asked Jun 9, 2019 by Djam36
110,608 questions
257,186 answers
0 comments
1,134 users