Gently Specification Language

The language Gently is a specification language for HTML dialogues. Its type system and syntax are oriented towards Java. Gently allows the specification of a HTML dialogue as a static object system. The signature of this object system is expressed in Gently in a single source file. This source file is conceived as the place of documentation of the functionality of the HTML interface. The documentation for the JSPs shall be provided in the Gently file, and shall be ruled by the design by contract paradigm. The Gently generator performs static type checking on this specification and generates JSP templates, containing protected regions. The JSP templates can be completed by inserting custom code into the protected regions. Gently considers the different pages of a JSP interface as the static objects which constitute the interface. Each JSP is specified in the Gently file in a syntax element jsp similar to the class construct in Java. Each JSP can have a set of different methods with different parameter signatures. We have introduced this option in order to permit the invocation of one JSP with different parameter sets. As a result we obtain a two level hierarchical structure of the services offered by a HTML interface. It is not our intention to prescribe a special usage of this feature. The programmer is free to decide about the distribution of functionality over different JSPs. Each method within a JSP construct has a fixed parameter set. The method construct in Gently is again similar to the method syntax in Java. In the body of Gently's method construct, two types of declarations have to be provided. In one type of declaration the programmer has to specify all links and forms which shall be offered by the result page of this method. Since links and forms enable calls of dialogue methods, their declarations resemble method calls. They start with the keywords link or form, they get a label, which enables references to them, and finally they have a method call syntax, e.g. For links, the actual parameters are names of variables. Gently generates a protected region in which variables with these names are accesible (the declaration is placed in front of the protected region). The custom code should assign values to these variables. In the code subsequent to the proteced region, these variables are used to construct an appropriate HTML-link code. In form declarations each actual parameter is a pair of the widget type that shall be generated and a variable name. The values of these variables are used to provide the default values within the widgets. These link or form declarations serve as specifications of the possible next actions the user can take. Our intention with Gently is to maximize local specification value, therefore we demand the other type of declaration in each method, the called by declarations. By such declarations the programmer has to specify all places in the dialogue, where links to this method are offered to the user, i.e. all methods in which this method is called in a link or form declaration. Naturally, one has to place called by declarations in front of link or form declarations. Both declaration types are separated by and, declarations of one type are separated by or. Alternatively, in other versions of the tool, called by declarations or even an appropriate state chart visualization could be generated, too.