Book Image

Software Development on the SAP HANA Platform

By : Mark Walker
Book Image

Software Development on the SAP HANA Platform

By: Mark Walker

Overview of this book

Table of Contents (19 chapters)
Software Development on the SAP HANA Platform
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Hello, World!


Let's start our development by creating the standard first application used in every language under the sun; the Hello, World application. This will allow us to ensure that our development environment is functioning correctly, that our application descriptor files (.xsapp and .xsaccess) are correct and that the XS Engine is working correctly.

To do this, we'll create a new file in our application, called hello.xsjs. This file will be our application's main file, the one we'll call from our browser.

An XS Engine program is written in JavaScript, and the program generates HTML for the browser. Our program will be very simple—it will just tell the browser that we're sending some HTML, and then output the Hello, World text.

Our program code is therefore as follows:

$.response.contentType = "text/html";
$.response.setBody( "Hello, World !");

Type this code into the hello.xsjs file, then commit and activate it on the server.

The $ annotation at the start of each line tells the XS Engine...