使用HANA Web-based Development Workbench创建最简单的Server Side JavaScript

  1. 云栖社区>
  2. 博客>
  3. 正文

使用HANA Web-based Development Workbench创建最简单的Server Side JavaScript

jerrywangsap 2018-05-27 14:43:52 浏览1205
展开阅读全文

服务器端的JavaScript, 看下wikipedia的介绍:
https://en.wikipedia.org/wiki/JavaScript#Server-side_JavaScript
Server-side JavaScript

In December 1995, soon after releasing JavaScript for browsers, Netscape introduced an implementation of the language for server-side scripting with Netscape Enterprise Server.

Since 1996, the IIS web-server has supported Microsoft's implementation of server-side Javascript -- JScript -- in ASP and .NET pages.

Since the mid-2000s, additional server-side JavaScript implementations have been introduced, such as Node.js in 2009.

再看SAP的Server Side(服务器端) JavaScript解决方案:SAP Extended Application Service
打开SAP HANA Web-Based Development Workbench:

创建一个新的package:


创建一个新的Application:


创建一个新的文件test.xsjs, 内容如下:

var userInput = $.request.parameters.get("userStuff");
$.response.contentType = "text/html";
$.response.setBody(userInput);


这个hello world应用是一个简单的echo应用:将用户通过url传进来的数据直接输出。
测试:

要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:

网友评论

登录后评论
0/500
评论
jerrywangsap
+ 关注