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

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>

ViewRefs?

<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>

ViewPlaceHolders?

<hbox>
	<!-- this is where the detail will show -->
	<data param="this" property="detailView">
   		<viewplaceholder/>
	</data>
</hbox>

Nightly Build Reports

*MW checkstyle report

*MW pmd report

*Server checkstyle report

*Server pmd report

*Client checkstyle report

*Client pmd report

Attachments