The problem
In UI implementation, clinical applications demand quite capable UI controls. Just take a look at Microsoft CUI project components, and you can see how specialized widgets clinicians need in order to use clinical software efficiently.
Since these are not the usual buttons and checkboxes of a business application developer, even if the design is approved by the clinicians, their implementation demand a capable UI technology. Just investing into strong UI technologies does not solve the problem, because openEHR implementations heavily rely on models, in other words composition of RM classes described by ADL. Joining the UI to these models is an architectural challenge, and unfortunately all UI technologies do not fit with all architectural options. There are pros and cons of UI choices, and I'll try to list and discuss them below.
The reality about distributed systems
In today's world, developing a clinical application which does not have a distributed nature is not likely. After all, most of the effort in openEHR, Snomed CT, HL7, and other initiatives is about sharing data. There is a very strong assumption of sharing data among clinicians, so the system becomes distributed at some point anyway. Web applications are distributed by nature, due to browser server communication, and desktop applications (other than a single doctor in a single practice scenario) are also distributed in nature, mostly due to database and business logic being at seperate layers, and mostly on different machines than the client's machine. There are many doctors out there with a simple software that runs on a windows 98 environment (yes, windows 98) using a piece of code written in Delphi, but these are the people we want to connect to others anyway. So I'll assume that any implementation will end up in a distrubuted nature somehow.
Binding to model
In any distributed software, the user is given a front end, a UI, which has to be connected to some back end functionality, and how that connectivity is achieved is the problem of the implementor, not the user. This is a very well known requirement which has been implemented in various forms through many different technologies. This binding to back end is a key factor in decrasing costs for the implementor. The easier and more efficient it becomes to connect UI to back end, the better an implementors position in competition with the others. If you can change the location of a UI widget without compiling code, that is and advantage, if you can simply annotate a UI widget with a special expression that will automatically connect its value to some back end object, that is an advantage. Unfortunately, you just can't say, okey than let's pick up the most efficient one, and use that, because other requirements like capable UI widgets conflict with this one. Let's see why
How UI binding to back end works in modern technologies
I'll take JAVA and .NET as two major technology platforms, with the most advanced architectural practices and available frameworks. If you are using Python, Ruby, Orbeon, Eiffel, C++, your method for binding UI to back end may or may not be different, but your input to this dicussion would be appreciated.
Today, some form of data binding is available for almost all serious technology frameworks. The name for binding to back end may be data binding, or method binding or bean/object binding, I'm referring to practice of declerative bindings from UI to some back end functionality.
Naturally, UI frameworks have to define a well documented, well defined way for bindings. You can not expect developers to use a different binding for each UI widget (at least not in all domains), so at least for form based business applications, there are generic binding mechanisms like binding the value of an textbox to a backend object. There is usually a set of basic widgets, like text box, combo box, check box, and table etc. There is usually a set of development tools which let you use this framework, both visual studio for .NET and Eclipse Web Tools Project are examples of capable tools which let you modify GUI layout, develop and deploy code etc. If this setup of components, tools and frameworks is enough for you to fulfill the requirements of users, then things are fine.
As you need to change things, especially in the UI, this scenario begins to become more complicated. An example from Opereffa is the JSF bindings. Java Server faces has nice things like templating, which lets you reuse UI artifacts, it has a good data binding mechanism for binding UI widgets to back end Java beans (objects), it has a lifecycle mechanims to which you can tap into, it has validation methods for data sent to server etc. JSF is the latest web development stack which is a specification, so it is the usual industry accepted Java technology like many others we've been using for the last decade or so. In terms of UI, this specification's implementations offer a set of options, which are more or less like the others. Some implementations have some javascript support for more convenient components like date pickers etc. This mature and tested framework, which should cover a lot of use cases, begins to be insufficient when it comes to building a web based clinical application with openEHR. Here is a list of things I had to to, along with their explanations.
1 to 1 or n to 1?
A design question that came up early in the proof of concept work was this: do we generate a seperate back end object for all UI forms, or do we bind all forms to a generic mechanism that can process all UI forms?
The advantage of having a seperate object for each form is, it is possible to stay closer to the normal way the framework is supposed to be used. You can generate source code for each model, with field and method names corresponding to archetype nodes. However, this scheme of things requires a recompilation and redeployment each time you change something in an existing GUI-object binding, and whenever you introduce a new set of artifacts, ie new models to the system.
Using a single binding mechanism to back end on the other hand, lets you create artifacts in the form of JSF XHTML files, and you can update them on the fly, as the system is working. Personally my golden rule is to invest in cheaper maintenance in software whenever you can, so this is how Opereffa works, but is this type of binding possible at all in JSF, with its default setup? The answer is no, and here is why.
Archetypes describe models, to which we need a way to refer to from UI. The binding example given here shows the situation at the moment, but normal binding syntax of JSF does not let you express the semantics you need for archetype binding. So Opereffa extends JSF's Unified Expression Language resolver with a custom resolver to connect UI artifacts to a single resolver.
This solution, which requires a little bit modification to JSF, is still a JSF solution, since it uses valid options in the framework. We can use open source or commercial tools to modify JSF XHTML files, and we have both automatic connectivity and tool based productivity, It looks good! Things get tough when we reach the UI level at the browser.
Which technology for the browser?
The browser is the platform now. There is an incredible amount of functionality you can perform within a browser, ( just take a look at quake live ) and this is good news, because the UI layer for a web application is the browser, and it is good to have a lot of power at this level, so that we can give clinicians an efficient UI.
The problem is, the more specialized the UI layer, the more disconnected it becomes from server side web stacks. Asp,NET, JSP, JSF, Ruby on Rails, PHP are all server side web stacks, and things like bindings to business objects are features of these stacks. They expect the browser to render html or HTML + some javascript and they expect a good old http post or get to initiate the bindings to objects.
When you choose more specialized technologies for browser, like Google Web Toolkit, Flex, Flash, Silverlight etc.., the classical web stack technologies become irrelevant. These powerful UI frameworks of the browser either use their own protocols or well known methods like JSON or Web services (or REST for a simpler version of it). So if you invest in them, you need a different set of tools to increase your productivity. In case of Opereffa, selecting one of these means two things:
1) Binding mechanism is no longer useful, since it expects a http post
2) Tooling around JSF is no longer useful, since JSF artifacts are not used, you now need a designer for Google Web Toolkit related tool, or a Silverlight designer.
From a project management point of view, younger technologies are risky. You have to find develoepers who have experince in your chosen technology, and no matter how much hype is behind them, technologies just don't cause developers to grow in trees. You can find someone with 5 years of JSF experience, who has an idea about how to handle almost any requirement with JSF. Try the same for GWT or Silverlight, and lets see what happens.
The technologies themselves also have to prove that they they can survive real life, and with ASP.NET and JSF you can find many working examples of important projects, but if you switch to some young technology, you are either the next success story or the sacked project manager who is just in between jobs at the moment...
Back to doctors waiting for their capable GUI. We chose DOJO in Opereffa, so that we can have something better than plain HTML, and we can still use JSF bindings. At the moment, it is working, but is it absolutely future proof? I don't think so. It can survive up to a point where users of Opereffa say: "this form takes forever to fill", or "why can't we have those useful widgets in Opereffa?". The thing to remember at that point is the cost and benefit of choosing a different combination of technologies and architecture.
One can bypass HTML and invest in a RIA (Rich Internet Application) technology. For UI this may feel like a fresh breath of air, but don't be surprised if some of the project managers and developers spontaneously combust. You may have to buy new licences for a set of tools, you may have to deal with setup of a new middleware, which ends up consuming twice the hardware your old one used to consume. The point is, every change has an effect.
Non technical issues
In Opereffa, we have multiple non-technical, non-functional requirements. It needs to focus on open source, it needs to support tooling, it has to be industry friendly. But we can never win all of those battles. For example if pressure for very specific components in UI becomes too high, JSF can be replaced with a web services type of layer, which is direcly connected to UI via some sort of remoting technology. We may win clinicians, but lose technical people with this decision. The choice is not our all the time either. We may have to abandon JSF + DOJO combination simply because it can't do some of the things we need to do, or can't do them properly. This is why we have CRB, to push us if we need pushing.
Technologies
There are a couple of technologies mentioned above, in the context of this discussion. They are all capable UI layer options, with their pros and cons. Here is a brief summary of them:
DOJO Toolkit: It is an open source AJAX framework with its own widgets. It allows design of custom widgets, and it can parse and turn normal HTML output in the browser into its own widgets. This is the way it is used in Opereffa, since it is possible to decleratively mark JSF components in XHTML files, so that their output can be parsed by DOJO. It is also a pure client side javascript kit, in the sense that making use of it does not require you to tweak anyting in the server side, When used in declerative way, normal HTML editing tools can be used to edit source code, ui layout etc.DOJO is quite good at isolating the developer from quirks of multiple browsers, and javascript probably has the largest market penetration among all other browser technologies, including flash. It is cross platform, so all major platforms should be able to consume it.
Flex: It is a technology that uses flash runtime in browsers, it is open source and free, but its development envrionment is not (EDIT: The Eclipse based Flex Builder product from Adobe is free for educational use and for unemployed developers, see https://freeriatools.adobe.com/ ). Cross platform technology.
Flash: Still an option to build very capable UIs, very mature, but just like Flex, it uses Actionscript, which is not a very common language among enterprise developers. Cross platform technology. (a little weak in mobile domain though)
Silverlight: With its version 3, it has become a powerful development option, Microsoft does a great job of connecting its technologies to each other, but due to its nature Silverlight can be pretty much a standalone technology that can consume web services, so it should at least theoretically be usable with a web services based middleware. Its advantage at this point is that MS CUI work is being implemented in Silverlight, so there is an easier way for its users to make use of CUI, compared to other technologies.
Mostly server side technology with AJAX support: Many MVC oriented frameworks like JSF, ASP.NET (and ASP.NET MVC), Ruby on Rails etc, can be included in this category. This hybrid combination can be more flexible, but especially for complex GUI operations, it can quicky become hard to maintain.
<Insert your favorite technology here>: please comment so that this discussion can go forward.
Conclusion
There is no killer combination of technologies for building capable UIs in clinical application domain. You may win at the front layer, but lose in other dimensions. Your identity matters, if you are a company with customers waiting for solutions, you have more freedom in certain ways, compared to a community project which needs to position itself between multiple vendors, clinical communities and technical communities.
The reason Opereffa is created is to test these assumptions, to see if gains from a decision can outweight losses from it. Hopefully, we'll move towards a better total output with feedback from both technical clinical communities.
Comments (7)
19-Aug-2009
Erik Sundvall says:
Thanks for documenting the decision process. I understand the reasoning, but hav...Thanks for documenting the decision process. I understand the reasoning, but have one main concern: perceived user speed. If I understand clinicians correctly they really hate delays
and this is one of the main usability issues in many EHR systems (at least in Sweden).
Client platforms have quite a lot of processing power nowadays and some argue that as much processing as possible (e.g. rendering and validation) should be pushed to the client side and that network traffic and server load should be kept as limited as possible. (Like Gmail's use of GWT) Some final server side validation before storage will still be needed of course to avoid faulty or malicious EHR clients entering garbage.
It will be interesting to see how Opereffa GUI use scales with many concurrent users.
Anyway, the main need now is to have an open source platform for entering openEHR based data, well done!
21-Aug-2009
Seref Arikan says:
I agree. We've known from the beginning that we would be needing capable UI tech...I agree. We've known from the beginning that we would be needing capable UI technologies. That's the reason DOJO is added on top of JSF. There are works like MS CUI which makes things even harder. Opereffa delegates the scaling to underlying frameworks as much as possible. I am seriously considering eliminating JSF and or at least making the server side more web services/REST oriented. For the front end, Flex looks promising. I suspect that DOJO can efficiently provide the cutting edge UI clinicians would demand. Even if it is theoretically possible to do a lot of stuff with DOJO and javascript & DHTML, it is not very practical to code. I may give a go to flex & web services, but first I need to work on a generic framework for GUI to back end binding. I have an idea which feels promising at the moment, but time will show if it can be useful
Thanks for the comment, we need this kind of discussion to move forward.
22-Aug-2009
Tim Cook says:
There are many aspects of MS CUI that I like. However, they are becoming m...There are many aspects of MS CUI that I like. However, they are becoming more and more MS platform (Silverlight and WPF) specific. This is pushing them down the list of priorities for OSHIP. We can still emulate the actions without issue though; through the templating language widgets. I do not know enough about the Java technologies to compare them one to one to the Python ones we are using but I do not see the issues you are describing. AJAX/KSS provide all the client side processing we need so far.
I'm not sure of the goal(s) of Opereffa. But OSHIP is designed to be a developers platform for ANY type of healthcare application based on openEHR technologies. Whether it is a simple blood pressure registry or a full blown EHR. That is up to the developer. So there is a lot of work to do at that point. BUT....they do not have to know everything about openEHR to make it happen.
Our approach is that the developer should be able to transform (via the help of some tooling) ADL into Python classes, create a UI using the default (or a plugin) template language and build their application.
Okay, that makes it sound simpler than it is in reality; but then that is why I am an openEHR/OSHIP consultant.
22-Aug-2009
Seref Arikan says:
Tim, the issues I am describing are actually generic. Even if my examples are fr...Tim, the issues I am describing are actually generic. Even if my examples are from a Java back end, The issue exists in any modern middleware, front end integration.
Regarding the power of UI technologies, please check especially primary and secondary care demos here:http://www.mscui.net/PatientJourneyDemonstrator/
Annotations on images, real time ECG data display, flexible layout management. These are not easy to provide with AJAX. Even without CUI, there is a need for stronger UI capability than the one that can be provided by usual form element type of widgets. I simply can't see javascript + DHTML scaling to that level of functionality efficientlyl
For goals of Opereffa, Opereffa's own site may be helpful: http://opereffa.chime.ucl.ac.uk/introduction.jsf
23-Aug-2009
Tim Cook says:
Your link to the mscui demos require non open source platforms and software.&nbs...Your link to the mscui demos require non open source platforms and software. A non-starter here.
Annnotations on static images can be done with the correct image libraries. Real time data capture and display are not use cases for browser based applications. The data can be captured and persisted to the same back end and be reused later; but they are not real time. That is a serious error in systems analysis and design, otherwise.
I've seen the opereffa site and loaded the live dvd/cd (whichever it was). Have you taken a look at OSHIP?
24-Aug-2009
Erik Sundvall says:
Seref wrote: "at least making the server side more web services/REST oriented" ...Seref wrote: "at least making the server side more web services/REST oriented"
We are working on a GUI / Persistence split using REST, and it seems nice so far. If things work out fine then different backend solutions could reuse GUIs from others and vice versa.
Seref wrote: "For the front end, Flex looks promising."
I did some Snomed CT browser experiments using Flex and it was a rather nice programing experience, see http://www.imt.liu.se/~erisu/TermViz/beta/TermVizBeta1.html (swipe the cursor over the tabs as an arrow-rendering-bug workaround). I'm not sure if the end user experience is that great right now though, but that is probably more due to my limited programming time and design skills rather than the Flex platform itself. The search server (Java) is only online when I'm developing, but then it uses REST for communication.
Seref wrote: "I suspect that DOJO can efficiently provide the cutting edge UI clinicians would demand. Even if it is theoretically possible to do a lot of stuff with DOJO and javascript & DHTML, it is not very practical to code"
That's why I think it is interesting to look deeper into GWT where you do the programming in normal java developer environments using the Java language and then compile to optimized javascript. Perhaps parts of your "generic framework for GUI to back end binding" could run on the client side compiled by GWT to Javascript.
24-Aug-2009
Seref Arikan says:
I've have experience with GWT, and it has its uses. I'm talking about a lower le...I've have experience with GWT, and it has its uses. I'm talking about a lower level capability here. The key to building more capable UI's is to have a some sort of canvas mechanism, on top of which , you can paint whatever you want to paint using a given api. Even with GWT, you end up rendering a browser widget with some CSS. When you see an "onpaint" type of event handler in an api, you have access to the kind of functionality that lets you build pretty much any widget. GWT's model output a combination of javascript and DHTML at the end. Canvas element is introduced in HTML 5, which makes it an alternative to flash and silverlight in theory, but it will take it some time to become mature enough, with backing tooling. Flex on the other hand seems to offer that custom compenent path with onpaint type of support (not 100% sure yet)
Regarding my generic framework for gui thing, I have almost given up on that, there are things like myxaml etc, but I can't stop vendors from choosing other technologies, and I want Opereffa to have a method that will serve pretty much any GUI technology. Lately I've been looking into generic methods of UI - Backend databinding. Uface ( http://code.google.com/p/uface/ ) is more like what I have in mind. If I can build a well defined facade api in front of a databinding framework, that would be connected to my archetype/template object layer, for each major GUI technology, a set of facades would be enough. This feels good to me for the moment. With a couple of facedes, I can simply support code generation/artifact generation for multiple UI technologies.