This home-control example uses some simulation components in order to have values to display and change. The example uses css classes from w3css for the basic layout and styling, w3css is a stylesheet from w3schools.
For more information about how to use web user interfaces with CDP Studio, see the Web UI documentation.
How to Run the Example
To run the example from CDP Studio, open Welcome mode and find it under Examples. Next, in Configure mode right click on the library project and select Build, then right click on the system project and select Run & Connect. See the Running the Example Project tutorial for more information.
After the library and system are built and the application is run, check the Application Output in CDP Studio to verify where the StudioAPI server is listening, e.g. "StudioAPIServer: listening on 127.0.0.1:7689". The corresponding address will serve the demo web application: http://127.0.0.1:7689/www/index.html
The Files of the Project
In the calls to studioapi we are providing callback functions that change elements of our site, we find these elements using the ids mentioned above. The callback functions provided to the "subscribe" functions are called on value updates, other callbacks are called only once when the server has handled the request.
The Way Forward
We recommend visiting and checking out the learning material and examples made available at "http://www.w3schools.com/". They also cover the most popular frameworks and some of their own alternatives as well.
Introduction and reference is available at http://www.w3schools.com/w3css/default.asp