XML/XSLT Web Services Framework (XWSF)
Introduction
- XML-based approach for creating graphical user interfaces, based on XSLT (Saxon) and bindings to calls to Eclipse SWT.
- No boring Java GUI code needs to be written
- All the GUI design and layout is entirely written as little XML documents
- Follows model-view-controller architecture
- Can support multiple types of client.
Key concepts
- ModelObject? can be any Object. Even though existing applications use the HL7 v3 RIM as object model, the GUI Framework is entirely independent of that
- View is the focal class of the GUI, it is the visual representation of a ModelObject?
- View can represent and combine one or more ModelObject?.
- ModelObject? features are bound to GUI elements by data binding objects, called RefreshableItem?
- To access features of a ModelObject?, we use ViewAdapters?.
- A ViewAdapter? helps in decoupling the GUI representation from the design of the ModelObject?
View Definition XML
<?xml version="1.0" encoding="ASCII"?> <view controller="application.controller"> <param name="participant" adapter=“app.ParticipantAdapter" /> <boxLayout type="vertical" /> <label>Enter your Name here :</label> <text> <data param="participant" property="Name" aspect="text" /> </text> <button> Register <action name="RegisterParticipant" event="selection" /> </button> </view>
What all things do I need to code to develop my application on top of XWSF framework?
- View definition XMLs
- Actions and Controllers
- View Adapters
Architecture
How Data flows from server to Client ?
If there are any updates which needs to applied to UI, data renderer will simply form xml message describing the UI update and will put into the message queue. This update message describes the ID of widget which is to be modified, which aspect (text value, tooltip, etc.) has to be modified, the updated value.
The SWT Client poller keeps polling the server continuously, looking for any UI updates. (It keeps sending <getUpdates/> request after specific interval.) In response to <getUpdates/> request , server fetches all the update messages from the queue and returns them back to the client.
Features
- Basic widgets
- Events and Actions
- Refreshable Items
- Layouts
- Composites like HBox, VBox, groups
- Advanced widgets like Tab folder, Menu and certain XWSF specific components.
- ViewRefs?
- ViewPlaceHolder?
- Auto Completers
- Drag and Drop
Events and Actions
<button> Save <action name=“Save" event="selection" /> </button> <text> <action name="SearchOnEnter" event="key"/> </text>
Refreshable Items
<view controller="application.controller"> <param name="participant" adapter="application.ParticipantAdapter" /> <text> <data param="participant" property="Name" aspect="text" /> </text> </view>
<scrolledComposite>
<boxData layoutOnce="true">
<width value="0" stretch="1fil" shrink="1fil"/>
<height value="0" stretch="1fil" shrink="1fil"/>
</boxData>
<xwsfList>
<viewref href="org/regenstrief/mw/patient/list-menu.xml"/>
<data param="patientList" itemize="yes">
<viewref href="org/regenstrief/mw/patient/list-item.xml">
<with-param name="patient" param="."/>
</viewref>
</data>
<action name="XwsfListActions" event="selection"/>
</xwsfList>
</scrolledComposite>
<hbox> <!-- this is where the detail will show --> <data param="this" property="detailView"> <viewplaceholder/> </data> </hbox>
Nightly Build Reports
Attachments
- XWSF_Architecture.gif (17.0 KB) - added by mnalkande 2 years ago.
- DataFlow.gif (8.4 KB) - added by mnalkande 2 years ago.
![(please configure the [header_logo] section in trac.ini)](/mw/chrome/site/logo100.png)

