Discussion areas about moving legacy UI to a module

Lately, we’ve been working on moving the legacy UI to a module, most of the work is complete but there are a few things we would like to do or we’ve done and would like to get your views, below are the issues.

  • After the migration of the legacy UI, the webapp sub project in the platform has few files in it, we are considering merging it with the web sub project.

  • There are some new features in the new Servlet API 3.0 which we’ve tried to make use of in the module to achieve certain things you probably wouldn’t be able to from modules e.g registering listeners and servlets that behaves like true servlets, adding new mappings to an existing servlet etc. The strange thing is that the new API provides ways to register web components but doesn’t provide ways to remove them in the event of when the module is stopped or uninstalled meaning these components registered from modules hang around until the web app is restarted, we think we can live with this.

Does anyone foresee any issues with or have any objections to these changes?

1 Like

(what I said on the design call was…)

I think we can live with the scenario where some modules are no longer hot-swappable.

In production nobody should be stopping/starting modules without a tomcat restart. For developers, I think that having a cleaner and leaner OpenMRS platform (with fewer pre-2010-era dependencies) is more important.

(We should then provide a way for a module to signal that it requires a full webapp restart, or better be able to automatically detect this.)

This change should be discreet for modules declaring a dependency on openmrs-web provided we build and deploy both jar and war file for the openmrs-web submodule.