Integrating Open Web Apps with the rest of the application

@sunbiz, @n_nehete, we should start figuring out how code written in OWAs can integrate more closely with the existing OpenMRS reference application.

In particular, I think an OWA needs to be able to create app definitions and extension points (i.e. this tutorial step shouldn’t require going the administrator to do anything.

I propose we make the module aware-of the App Framework module, and support a new section in manifest.webapp (I guess under activities) where the OWA author would define app templates, apps, and extensions exactly like is currently done by putting json files under /omod/src/main/resources/apps/.

The OWA module should register and unregister these apps and extensions when an OWA is added/removed.

The alternate approach is to think of the OWA module as part of the underlying platform, and allow other modules to register callbacks when an OWA is added/removed. Then the appframework module would become aware-of the OWA module. (This may be more consistent with our future direction.)

2 Likes

I am pretty sure the current approach of launching apps from the homepage is bad UX. In my EMR course, which had some HCI students, they critique that the current UX contradicts flow theory’s rules. It makes the user lose track of the flow by always having to go to the home screen, instead of allowing to jump. The breadcrumbs somewhat help, but not far enough. The hamburger menu (the three lines icon), is a jump UX convention that is much better. I think OWAs should be launchable through such a menu. Infact, all apps in the refapp, but that may be too path breaking?

I like the second approach, because then it allows flexibility across the platforms and distributions. Combining different OWAs together is easier that way. the …ws/rest/owa/applist endpoint can GET whatever the apps are installed, but may be you are suggesting a Listener with Observer Pattern?.

I think the highest priority is to make it possible for OWAs to fit into the current application, so that we can enable non-breaking innovation, and provide a gentle path from the current code to whatever new evolves. So I think that discussing global nav is a topic for another time. :slight_smile:

Tangent: In fact the app framework supports the general idea of extension point, and things that connect to it, so we could add jump navigation within that UI as an incremental step, without having every single OWA necessarily show up there. (E.g. we probably want to go in the direction of moving some of what’s currently in the uiframework-based UI Commons module into an OWA of shared UI components, that isn’t actually an app of its own.)

I’m suggesting a server-side, Java Listener and Observer pattern, yes. E.g. App Framework would register an OpenWebAppListener.