Building a simple Example Application

Top  Previous  Next

In next topics we'll apply the previously learned fundamentals to build a HostSurfer application. In this case, we'll use Handlebars (bundled with z/Scope Anywhere) to generate the web interface.

 

Handlebars is an open source Javascript library which let us build semantic templates in HTML. These templates combine HTML code with special expressions that, at runtime, will be processed and replaced by other content, such in this case data extracted from the terminal screen. The handlebars.js library is already included with the HostSurfer API library and none explicit reference is necessary to use it. For more information and reference please refer to http://handlebarsjs.com/.

 

Pre-Requisites

 

To begin with, please setup the following development environment:

 

Create a folder for your application, i.e., 'myapp'.
Create a sub-folder named 'js' under 'myapp' folder.
Create a sub-folder named 'rules' under 'myapp' folder. You can also create 'css' and 'images' sub-folders as needed.
Open Brackets and set the working folder to your application local folder.

 

Now you are ready to start developing your first HostSurfer application by following these steps:

 

Creating the Index.html page
Adding screen rules
Using HTML page templates
Running the Example Application
Extending the Example Application