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