0% found this document useful (0 votes)
33 views

Week 5 Unit 1: Review

Uploaded by

evasat111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Week 5 Unit 1: Review

Uploaded by

evasat111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Week 5 Unit 1: Review

Review
Development Model (XSJS) (1)

UI rendering completely in UIS


the client
SAPUI5
Server-side procedural
logic in JavaScript XSJS XSODATA

All artifacts stored in the XSXMLA


SAP HANA repository
SINA

HDBTable HDBRole

CDS/HDBDD

SQLScript AFL
SQL
Views

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


Review
Development Model (XSJS) (2)

Server-side JavaScript (XSJS) UIS


Lightweight procedural logic SAPUI5

Fast/open XSJS XSODATA

Reuse XSXMLA

One language: SINA


 Client
 Server side HDBTable HDBRole

Widespread knowledge CDS/HDBDD

Rapid development SQLScript AFL


SQL
Views

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


Review
Server-Side JavaScript

Native application-specific
code

Control data flow logic

Store XS JavaScript code in


the repository

JavaScript editor/debugger

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


Review
The XSJS Application Programming Interface

Interact with the SAP HANA


XS runtime environment

Access SAP HANA database


capabilities directly

Expose, update, insert, and


delete data

Request API
 Control HTTP request/response

Database API
 Open DB connection, roll back
changes in SAP HANA

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 5


Review
Server-Side JavaScript Libraries

Reuse program elements

Reuse 3rd party/Open


Source code

Perform repetitive tasks


 Handle forms
 Manage date/time strings
 Parse URLs

Import into other XSJS


programs

Call from other XSJS


programs

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 6


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 8


Week 5 Unit 2:
SAPUI5 Consumption
SAPUI5 Consumption
Overview

Enterprise-ready HTML5
rendering library

Completely client-side UI

Open and flexible

Web development skills


(HTML, CSS3, JavaScript)

Extensibility and theming

3rd party JavaScript


integration

Targets multiple devices


Smartphone, tablet, desktop

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


SAPUI5 Consumption
jQuery.ajax

Use the embedded jQuery


libraries in SAPUI5 to make
asynchronous calls to XSJS
services

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


SAPUI5 Consumption
Calling an XSJS Service – Example

UI with 2 input fields

Call XSJS service when user


enters new value

XSJS runs on UI trigger and


performs defined action

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


SAPUI5 Consumption
XSRF – Cross-Site Request Forgery

Avoid unauthorized
commands from a Web site
your end users trust

XSRF protection should be


used on any create or
update operations

Automatically processed by
UI5 models

Must be handled manually


when calling XSJS services
directly

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 5


SAPUI5 Consumption
XSRF – jQuery.ajaxSetup

jQuery.ajaxSetup allows
injecting processing into
any ajax call

Check for the CSRF token


and request it if not present
before any non-GET
operation

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 6


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 8


Week 5 Unit 3: JavaScript
Language Constructs
JavaScript Language Constructs
Strings

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


JavaScript Language Constructs
Dates

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


JavaScript Language Constructs
Arrays

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


JavaScript Language Constructs
JSON

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 5


JavaScript Language Constructs
Objects and Inheritance

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 6


JavaScript Language Constructs
Objects and Related Business Entities

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 7


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 9


Week 5 Unit 4: Outbound HTTP
Outbound HTTP
Concepts

With outbound R R
SAP HANA Studio Application
Browser / HTML Client
connectivity Application
(Eclipse) Developer
User
support in SPS6, HTTP(S)
R
Debugging API
R R

XS-based
applications can R R
Repository Client
(regi)
call various ICM Request Processor Debugger
R
Rest
external Repo API
R
resources via
back-end
R R R
Repository
implementation Web Server
Outbound
Connectivity
JS Runtime OData
HTTP(S)
in XSJS
R DB Content
R R

Configuration Repository SQL Execution SQL Execution

SAP HANA XS Index Server

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


Outbound HTTP
xshttpdest

New development artifact –


xshttpdest

This development object


defines the destination and
its base properties

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


Outbound HTTP
XS Admin Tool

All authentication options


must then be configured
in the XS Admin tool:
/sap/hana/xs/admin

This is both a security


feature and a way for
customers to be able to
configure SAP or partner-
delivered destinations

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


Outbound HTTP
XSJS APIs

New API group in


$.net.http

Allows reading
the destination
details and then
making outbound
HTTP requests

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 5


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 7


Week 5 Unit 5: Reusable Libraries
Reusable Libraries
Concepts

xsjslib – the development


extension for code, which
you want to reuse in more
than one XSJS service

$.import and then a variable


to reference the library

Or the $.import can be combined into one line of code

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


Reusable Libraries
Examples: Messages

A reusable message
lookup and formatting
library

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


Reusable Libraries
Examples: Session Services

A reusable session/
application variable
processing library

Can also be used


standalone to convert
a RecordSet object to
a JSON object

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


Reusable Libraries
Examples: xsprocedures

A standard reusable library shipped by SAP to simplify stored procedure calls


from XSJS

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 5


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 7


Week 5 Unit 6: Job Scheduling
Job Scheduling
Concepts

SAP HANA now contains


a job scheduler, as of
SPS07, which can run
XSJS and SQLScript

New development
artifact: XSJOB

Extension to the admin


tool to maintain job
definitions and view job
logs

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 2


Job Scheduling
XSCRON Syntax

CRON-like syntax for


controlling job timings
and repetitions

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 3


Job Scheduling
XSJS APIs

New job extension to


the XSJS APIs

Ability to
programmatically
create and cancel jobs

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 4


Thank you

Contact information:

[email protected]
© 2014 SAP SE or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2014 SAP SE or an SAP affiliate company. All rights reserved Public 6

You might also like