Hi All,

I finally took some time a few weeks ago to do more work on the UI
framework. I'd hoped to send out an update before going offline for 2
weeks, but...here's the update now instead. :-)

*Background*
*
*
I spent quite a while over the last two years, with help from others,
investigating different UI frameworks, and ultimately deciding to build
something custom on top of Spring MVC. Many of you saw this during the two
2.x UI sprints we did last year. But a big sticking point was always how
we'd get from our current webapp to 2.0, preserving backwards-compatibility
of modules, but not requiring us to preserve every bad UI decision we made
in the last 7 years. Anyway, a recent conversation with Mike finally got
everything to crystalize for me.

*UI Framework module*
*
*
I have taken most of the *framework* parts of the 2.x UI work, and packaged
them up in a module that runs against the latest 1.8.x, 1.9.x, and trunk.
This means that you can start writing modules against this today that give
you some awesome features, like:

   1. the ability to write views with groovy templates
   2. controllers that auto-recompile whenever you change them in
   development mode*
   3. the ability to write "fragments" and easily compose pages out of them

I haven't had a chance to update the 2.x documentation pages on the wiki,
but if you are really itching to try this out, you can get the code from my
https://github.com/djazayeri/openmrs-module-uiframework, and build it with
maven 3. You'll also need the latest revisions of one of our release
branches, as I needed to make a small change to web.xml. Proper docs should
come later this week.

* = Will be documented better soon, but basically if you set a JRE argument
like the following, then that specific module (appframework) will work in
"development" mode, which means controllers and views will be auto-reloaded
from the mavenized module at the given path:
-DuiFramework.development.appframework="/Users/djazayeri/Documents/git-repositories/openmrs-module-appframework"

Note that this is purely the *framework*, i.e. it doesn't include anything
new in the UI, besides a test "Hello User" page.

*App Framework module*

To see a working example of how the UI Framework module can be used, you
can check out my second piece of work, which is what I actually discussed
with Mike to crystalize things.

This module is the foundation of a new UI approach that is "app-based".
"App" basically means what you'd expect if you're familiar with android or
iphone home screens: it's a name, an icon, and a url to go to when you
click it. These can be enabled per-user or per-role, so the idea is that
whenever you log in, or click "home", you'd see a list of your available
apps. (Some of us think this is the direction our new UI should move;
you'll definitely hear more from me soon.)

@Dave, I've included the idea of an AppFactory, so something like HFFS can
provide multiple apps depending on the system configuration.

I moved over a bit of the actual 2.x content and packaged this as a "Manage
Metadata" app, which shows the use of all the 2.x features (pages,
fragments, decorators, and fields) as well as the use of
webModuleApplicationContext.xml to create an app.

*What's Next?*

My immediate next steps are to modify the existing 2.x UI documentation to
refer to the new packaging as just a plain OpenMRS module, rather than its
own webapp under openmrs-contrib.

Medium-term steps are:
1. work with Mike and PIH so they can start exercising the App and UI
frameworks in some real use cases. Others are welcome to join in too!
2. do a couple of small apps (e.g. patient lookup, concept dictionary) to
provide specific bits of improved UI, while building up a library of useful
pages, fragments, and widgets.

Thoughts? Comments?

-Darius

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to