DEV162A
SAP TechEd 2015 - DEV162 Intro to Node.js Redesigned to Run in XS Advanced SAP TechEd 2015 - DEV162 Intro to Node.js
EXERCISE 1 – HELLO WORLD Objective
In this first exercise, you will learn the basics of the most simple of Node.js applications. We will focus on how to start an application and how to display output.
Exercise Description
Console Hello World Web Hello World
EXERCISE 2 –REUSEABLE MODULES Objective
In this exercise, you will learn about how to create and use reusable code in the form of modules. You will use both the npm tool and packages.json to define dependencies to these modules and make the installation of them quite easy. You will use one of the most popular modules – express; which helps with the setup of a web server and the handling of the request and response object. You will use express to handle dynamic and static content in the same application by using routes.
Exercise Description
Modules and NPM Express Module and package.json Express and static HTML content Local Modules
EXERCISE 3 –ASYNCHRONOUS / NON-BLOCKING Objective
In this exercise, you will learn about the fundaments of the asynchronous nature of nodel.js. We will so see how this asynchronous capability allows for non-blocking input and output. This technique is one of the basic things that makes node.js development different from other JavaScript development and also creates one of the reasons for its growing popularity. We will see how these techniques are applied to common operations like HTTP web service calls or even SAP HANA database access.
Exercise Description
Basic asynchronous processing Non-blocking I/O Non-blocking HTTP requests Non-blocking database requests
EXERCISE 4 –SAP XS SPECIFIC CAPABILITIES Objective
In this exercise, you explore the SAP HANA XS specific capabilities that are being added to node.js development. We will see how to create language translatable text strings and HANA database queries from node.js, we will also use the XSJS compatibility library to run existing XSJS artifacts without any changes.
Exercise Description
Text bundles SAP HANA database access from node.js XSJS compatibility
EXERCISE 5 –WEB SOCKETS Objective
Our final exercise will demonstrate the ease at which you can tap into the powerful web sockets capabilities of node.js. We will use web sockets to build a simple chat application. Any message sent from the SAPUI5 client side application will be propagated by the server to all listening clients.
Exercise Description
Web Sockets chat application