Hacker News new | ask | show | jobs
by icebraining 3567 days ago
Sure it's possible. As an example, Odoo is a full Python webapp "platform", with a core upon which the user can choose and load plugins to add features (from a simple contact list to a full-blown ERP/CRM/accouting/CMS) and extensions to those features.

On the frontend side, when you install a module, it loads the .js file (using a regular <script> tag) which contains a single function. The Odoo core passes its main JS object (the base of the core API) to that function, which then initializes the whole module and uses the Odoo API to configure stuff, setup hooks, etc.

There's no security, though: by design, a module is trusted and can do anything on the platform. I'm not sure if and how one could contain them.

(Disclaimer: I'm a developer working for an Odoo partner, we write modules and host it as a SaaS.)

1 comments

I don't speak Python, but on the client modules could run in web workers.