|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Product Review WebFace & WebFace Studio by Vultus
WebFace & WebFace Studio by Vultus
By: Brian Barbash
May. 23, 2003 12:00 AM
As Web services proliferate and more and more applications expose their business logic in this manner, the need for effective user interfaces to consume these services grows. WebFace and WebFace Studio, from Vultus, provide a means of creating rich, Windows-like user interfaces distributed in a browser for Web services. The interface behaves like a traditional client/server application and does not require browser refreshes. The technology is built upon XML, HTML, and JavaScript, and requires that the user be running at least Internet Explorer 5.0. For this review, the focus will be on WebFace Studio and the development process. Development in WebFace Studio To start developing an application, the SOAP Application Builder wizard is executed. From an existing WSDL specification, the wizard generates a basic set of display, data, and communications components, along with supporting code to execute the service and display its results. As an example, I've created a simple Web service that allows you to manage your gym workouts. To demonstrate the wizard, I have requested it to generate the components necessary to retrieve a specific workout definition from the system. Figure 1 shows the results of the operation.
![]() The parameters of the request include a workout ID and a user name and are shown by the two text boxes on the left side of the generated window. The result is an XML document that defines a specific workout and will be placed in the text box located in the right portion of the window. Behind every GUI component or combination of components that display data is a DataSet object. These DataSets are part of WebFace's Model-View-Control (MVC) architecture and function similarly to the Java Swing GUI components and their models (i.e., JTable and DefaultTable Model). In the case of the workout ID and username text boxes, a DataSet with one row and two columns (one for each field) exists behind the scenes. This DataSet is the source of the data for the SOAP call, not the controls themselves. To establish a relationship between the DataSet and the controls, a DataController object is defined. This ensures that changes to the data in the DataSet are reflected in the controls and vice versa. The workhorse of WebFace applications is the Task object. Several types of tasks exist within WebFace: All tasks may be executed synchronously or asynchronously depending on the process requirement. A Task object contains the definitions of and source control references for the input parameters, the destination control references for its results, and the operations that it must perform. In the workout example, the SOAP wizard created a Search Task to execute the appropriate Web service for retrieving the workout definition. When the submit button is clicked, the associated onClick event executes the Task to retrieve the data. The resulting XML document is displayed in the output textbox. While tasks handle data associated with the request/response of service calls, a Request Broker object handles the details of the communications process. Three broker types may be used in WebFace: Local, SOAP, and HTTP. The Local broker may only be used in conjunction with an Open Task to retrieve a window definition from the local machine. The remaining tasks may be used to execute remote services either via SOAP calls or HTTP calls. In the workout example, the result of the Web service call is an XML document that is displayed in a text box. In order to work with the data, however, a more sophisticated view of the information, such as a grid, must be presented to the user. To accommodate a grid display, a DataSet must be defined to hold the information. Figure 2 shows the DataSet Editor dialog in WebFace Studio. This allows the developer to specify the columns and rows for the data grid. Constraints may be placed on the data, including data types, whether a value in a column is required, or its nullability. Once the DataSet is defined, a DataController is created to link the DataSet to the display grid.
![]() To populate the new DataSet, the information from the XML document produced by the Web service must be mapped appropriately. Recall that WebFace windows and their controls are themselves XML documents. Therefore, an XSL stylesheet may be used to transform the result of the Web service into the appropriate DataSet object (note that parameters for a request are also transformed via XSL stylesheets from their source DataSets into the service call). To assign a stylesheet to perform the transformation, the task is edited to include an xsltReplyTranslator that points to the desired XSL stylesheet. Figure 3 is a new window created in WebFace Studio that leverages the communications components and input fields created by the SOAP Wizard, but with the output transformed by an XSL stylesheet to fill a data grid.
![]() As mentioned earlier, WebFace applications are event driven. Event handlers and all supporting code are written using JavaScript. In the WebFace Studio IDE, the developer may switch to the source view of the window to reveal the WAML document. From here, the CDATA element of the customCode tag may be edited to include any supporting JavaScript. All controls created are accessible as objects from the JavaScript code and may be manipulated or inspected at runtime. To wire an individual event handler to a control, the function name is assigned to the desired event in the properties editor for the control. Deploying Applications Summary Company Info SALES SOA WORLD LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||