The Sling language includes a built-in syntax for describing user interfaces. This is a generic format in which the programmer can specify nested user interface controls, their relationships, and properties for those controls.

(NOTE: While in practice, most Sling programmers will normally ultimately compile their user interface expressions to target Jkop Widgets, this is by no means a feature of the language so much as it is functionality provided by The Sling compiler that programmers commonly utilize. By design and as far as the language feature is concerned, Sling user interface expressions can be utilized to describe user interfaces also in any other framework.)

A Sling class can contain a top level declaration using the keyword ui to declare user interface information for the class:

class:

ui ComponentName
{
	OtherComponentName variableName {
		propertyName = "Value"
	}
}

In the case above, the user interface expression relates inherently to the class in which it is declared. This assumes that in some logical manner, the class represents a user interface component.


Twitter Facebook LinkedIn Youtube Slideshare Github