Introduction to Water": A New Native Web Services Programming Language
Water™ is a new Native Web Services programming language that allows you to program in XML syntax. It is an open language specifically designed to simplify the creation of new Web services. XML is now being used in many areas such as data representation, remote function calls (SOAP), interface definition (WSDL), and presentation (XHTML). To date, XML has been used to represent static, hierarchical data. Water extends XML to allow you to unify presentation, business logic, and data.
This article is the first in the series on Water and XML programming. Each article will cover a practical task that is required to create dynamic Web sites and services. These examples will demonstrate the dramatic code simplification possible using Water.
In addition to these articles, there is an on-line reference manual and 150-page book, "Water Programming" available at www.waterlang.org.
This article describes how to create and deploy a simple Water program. Although this is a very simple example, it demonstrates some powerful properties of Water and compares how the same task would be accomplished using other technologies.
The Water Integrated Development Environment (IDE) may be used for executing the examples in this article. The IDE is freely available at www.waterlang.org. The IDE contains three major panes: the source code editor, the object inspector, and the HTML browser. Water code is typed into the source code pane on the left. To execute the code, click the green Execute button. The output is shown in the two right panes. The upper-right pane is an object inspector showing the structure of the returned value. The lower-right pane is an HTML browser that shows the output as rendered HTML and accepts user actions.
Figure 1 The IDE contains three major panes.
You may use the IDE to run the program described below.
The Task: Embed the Date
If the following URL is entered into a browser:
the current date is returned in the following format:
Today is 2002-4-23