Closed Enet4 closed 9 years ago
Good idea.
According to our discussion I'm suggestion to have kind of Javascript Plugin that should be loaded at the bootstrap stage.
In terms of functionality they should be able to hook at least:
Maybe is a good idea to have some kind of extensions like the following (or maybe, we can go for ECMAScript 6 or Typescript)
// Examples of possible inputs for confs: {“name”: “widgetname", “width”: 10, “height”: 20, .. ? }
// This kind of information could be provided in a separated JSON files, for instance: SampleSearchWidget.js and SampleSearchWidget.json
var SampleSearchWidget = function SampleSearchWidget(confs){
SampleSearchWidget._base.apply(this, [confs.widgetname, “My Sample", confs.width, confs.height, etc...]);
}.inherit(SearchWidget).addToPrototype({
__init : function(parent){
}
setProxy : function(globalProxy){
// If need to access to some of global features/context?
// could be part of dicoogle-sdk.js ? only for the client-side part?
}
});
Just my 2 cents.
Not bad, I say. The Dicoogle JS SDK is a critical to the solution, therefore. And the entire web UI plugin architecture would lie on the client side. Time to design dicoogle-webcore.js.
The web core JavaScript module is done. Next I will implement some actually useful plugins and add slots to the Dicoogle web application. https://github.com/bioinformatics-ua/dicoogle/tree/feature/webUI_plugin_interface/dicoogle/src/main/js
Dicoogle Web Core has reached a functional version, and test query and result plugins are already implemented in new/webUIplugin. I will start new issues to address future concerns.
With the deprecation of the Swing graphical plugin interface and the uprising of future use cases for Dicoogle, there comes a need for extendability at the web user interface level. Web Service plugins can provide web interfaces, but these are not integrated into the rest of the Dicoogle web application.
Here are some of the features that we are trying to cover:
Below is a diagram with my proposal. The Dicoogle web page will provide specific UI slots for plugins to be inserted into (multiple plugins in the same slot could be separated with tabs). A Web UI plugin would compose a JavaScript module and a package descriptor (using a "package.json" typically seen in Node.js). An example of a package descriptor can be seen below. At the
dicoogle
subtree, it must contain at least the file name of the module and a pointer to the slot meant to be attached to.At the level of the actual module, a
DicoogleWeb
object would be exposed with some operations only relevant to the web interface.issueQuery
would perform the query (thus passing all the data needed by the engine) and trigger a result plugin by invoking an event in the result slot. TheonResult
event function, implemented by each result web UI plugin, should take a list of results and expose them freely.Let this issue be used to design and discuss Dicoogle's Web UI plugin interface. I will add more details as more suggestions and ideas come up.