Reputation: 113
I would like to implement a plugin mechanism where js code is stored in a database and dynamically loaded into the class. A query for a specific plugin is performed, then the code resulting from the query is used to update a javascript class (functions and members).
So what I would achieve is that part of the class is loaded at startup from the JS class file and additional parts of the class are loaded from the db, and eventually unloaded, at runtime, giving it more functionalities.
Is this feasible? how to create a function from string? do you think it is a good approach?
JS Framework is ExtJS 4.1.1, database is postgres 9.2
Thanks
Upvotes: 1
Views: 135
Reputation: 19935
I'm new to ExtJS, but I would not recommend this way to do.
My personal approach with plugins of the app is like this:
sencha app build
command line.launch
method of Ext.application
what I'm doing is basicly add each plugin's menu to the main menu.I hope this will give some inspiration to develop a more simple concept.
Upvotes: 1