Sunteți pe pagina 1din 140

SAP HANA Native Application Development

Henrique Pinto
Global HANA COE
Disclaimer

This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.

2013 SAP AG or an SAP affiliate company. All rights reserved. 2


Agenda

SAP HANA Development: Overview HANA Native Development Demos


Platform Project Setup
SAP HANA Extended Application Services (XS) XSODATA
XSJS
SAP HANA Native Development Model
SAP HANA XS Technical Architecture Introducing River
SAP HANA Studio Development Perspective The River Language
Workflow
New SP6 Features Appendix A: SQLScript
New SP7 Features
Appendix B: SAPUI5
Browser Based Development Tools
Appendix C: UI Integration Services
Editor
Catalog
Security
2013 SAP AG or an SAP affiliate company. All rights reserved. 3
Information

PDF: http://goo.gl/CUAKXz
HANA Instance: 05 HANA Port: 8005
ABAP Instance: 00 ABAP Port: 8000 SID: HPM Client: 001
Session: A
Server A: 54.196.174.61
Server B: 54.204.120.85
Password: HANARocks2013 / HANARocks2014

2013 SAP AG or an SAP affiliate company. All rights reserved. 4


SAP HANA Development: Overview
SAP HANA Platform
Platform for next-generation smart applications

Developers Data Scientists Business Users Executives Consumers

Applications
Industry | LoB | Consumer | Analytics | Social | Cloud | Mobile
& Tools

SAP HANA PLATFORM


Application Services
Development | Connectivity |

Application Server | UI Integration Services | Web Server

Unified Administration |
Lifecycle Management

Processing Engine

Security Services
Event Processing | Planning | Calculation | Predictive Analytics
Services

Database Services
Transactions | Analytics | Partitioning
Compression | Availability | Encryption

Rules | Text Mining | Search | Application Function Libraries | Geospatial

Integration Services
Mobile | XaaS | High-volume Replication | Real-time Replication | Hadoop

More than a DB its a true platform Re-imagined, Transformative Supports any application
Converged OTLP + OLAP Transactions, analytics, predictive, sentiment and spatial 60% of HANA use cases are outside of the SAP Landscape
Embedded business logic processing transformed for real-time business operations 440+ Startups are developing on HANA
Completely re-imagined

2013 SAP AG or an SAP affiliate company. All rights reserved. 6


SAP HANA Extended Application Services (XS)
Introduction

What: Small footprint application server / web server / basis


for an application development platform inside SAP HANA

Rationale: Enable application development and deployment


while minimizing architectural layers
Create apps that have an http-based UI (browser, mobile apps)
Apps run directly on SAP HANA, w/o additional external servers or
components
-> simplified system architecture = low TCO
Tight integration w/ SAP HANA DB -> best possible performance

Scope: wide range of apps


Lightweight small web-based applications
Complex enterprise business applications

2013 SAP AG or an SAP affiliate company. All rights reserved. 7


Development model for SAP HANA based native applications

SAP HANA extended application services offer


Easy access to SAP HANA database via HTTP-based consumption
Attractive, dynamic HTML5 UI applications via OData services or by
writing native application-specific code that runs in SAP HANA context Client
Powerful search services
Built-in web server to access static content stored in Presentation logic
SAP HANA repository

SAP HANA
Application development following a layered approach
XS
UI rendering completely in the client (browser, mobile apps) Control flow logic
Server-side procedural logic in JavaScript
All artifacts stored in the SAP HANA repository
Data Calculation logic

2013 SAP AG or an SAP affiliate company. All rights reserved. 8


An applications foundation

Presentation logic

Control flow logic

Calculation logic

Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 9


Performance gains with HANA

Presentation logic

Control flow logic

HANA
Calculation logic

Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 10


Modern clients handle presentation logic

Client
Presentation logic

Control flow logic

HANA
Calculation logic

Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 11


Push the control flow down!

Client
Presentation logic

Control flow logic

HANA
Calculation logic

Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 12


Push the control flow down!

Client
Presentation logic

HANA Control flow logic

Calculation logic

Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 13


The essence of HANA Application Services (XS)!

Client
Presentation logic

HANA
XS
Control flow logic

Calculation logic
Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 14


SAP HANA Extended Application Services Overview

Front-end Technologies Client: Browser or Mobile


http/s
HTML5 / SAPUI5
Presentation logic
Client-side JavaScript

Control Flow Technologies


OData
SAP HANA
Server-Side JavaScript XS Control flow logic
XMLA

Data Processing Technologies


SQL / SqlScript Calculation logic
Calculation Engine Functions
Data
Application Function Library (AFL)

2013 SAP AG or an SAP affiliate company. All rights reserved. 15


SAP HANA as an extension platform

On-Premise Cloud
Private Cloud (managed service) Public Cloud (PaaS)
ABAP

HANA Native Development (SQLScript, XS, River)

Java NW-based Java (+ Java VM-based)

SAP HANA Enterprise Cloud SAP HANA Cloud Platform

SAP HANA Cloud Infrastructure (incl. SAP Cloud)

extension of on-premise apps extension of managed apps (ABAP + extension of on-premise / managed
(ABAP + Java + HANA Native Java + HANA Native Development) on apps on PaaS
Development) 'dedicated hardware
2013 SAP AG or an SAP affiliate company. All rights reserved. 16
HANA as a development architecture

ABAP on HANA Instant Development Experience

ABAP in Eclipse HANA Studio Web IDE River (web) Bring your
Professional Flexible & Simplicity Simplicity & Own Tool
Developers Complete Integration Openness
Professional
Professional Developers LOBs & Biz Ecosystem
Developers Experts

Eclipse Orion on XS

REST / SQL Platform API

ABAP Development Services HANA Platform


LM
Platform
Sandboxing Versioning Platform
Multi Tenancy

Build Deploy Application


On Premise Cloud
2013 SAP AG or an SAP affiliate company. All rights reserved. 17
HANA Cloud Platform development architecture

Application Consumption

Browser
Application Services
XS
Native Device
Development

Load Balancer
Services
Database

Repository

Development Experience

Eclipse IDE
Neo Cloud Management

Web IDE Cloud

2013 SAP AG or an SAP affiliate company. All rights reserved. 18


ABAP and HANA Native Development (on-premise)

ABAP HANA Native Development

applications follow 3-tier architecture applications follow 2-tier architecture


ABAP is in general database agnostic, but with HANA Native Development is SAP HANA
release 7.4 optimized for SAP HANA specific and embedded in the database
Programming language: ABAP / ABAP OO with Programming language: River; server-side
the option to use SAP HANA features JavaScript, SQL/SQLScript
IDE: eclipse-based ABAP Development Tools IDE: eclipse-based SAP HANA Studio + web IDE
Guidance
use ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
consider HANA Native Development for development of new applications which will solely run on SAP HANA
combine ABAP and HANA Native Development to enrich existing applications (e.g. SAP HANA Live, Fiori)

2013 SAP AG or an SAP affiliate company. All rights reserved. 19


Traditional 3-tier applications (Java, ABAP)
vs. native SAP HANA applications

3-tier Native SAP HANA

Display
client rendered UI UI rendering client

application server UI rendering


app code Control
XS services
DB I/F Control
app code
& Queries
DBMS Queries HANA
Data Data

2013 SAP AG or an SAP affiliate company. All rights reserved. 20


SAP HANA Native Development
Model
Development model general rules

UIS
UI Rendering completely in the
SAPUI5
Client
XSJS XSODATA
Server-side procedural logic in XSXMLA
JavaScript
SINA
All artifacts stored in the SAP HDBTable HDBRole
HANA Repository
CDS/HDBDD

SQLScript AFL
SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 22


Development model

UIS
XSODATA SAPUI5
Low coding OData REST XSJS XSODATA
service generation framework XSXMLA

based upon existing tables and SINA


views HDBTable HDBRole

Create/Update/Deletion CDS/HDBDD

operations support added in SQLScript AFL


SPS6 SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 23


Development model

UIS
Specialized Service SAPUI5
Frameworks XSODATA
XSJS
XSXMLA XML for Analytics XSXMLA

SINA SAP HANA Simple Info SINA

Access HDBTable HDBRole

CDS/HDBDD

SQLScript AFL
SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 24


Development model

UIS
Server Side JavaScript SAPUI5
(XSJS) XSODATA
XSJS
Light weight procedural logic XSXMLA

Openness SINA

HDBTable HDBRole
Reuse
CDS/HDBDD
One Language Client and
SQLScript AFL
Server Side SQL
Views
Widespread Knowledge
2013 SAP AG or an SAP affiliate company. All rights reserved. 25
Development model

Repository Representation UIS


SAPUI5
of Catalog Objects
XSJS XSODATA
Schemas: HDBSchema
XSXMLA
Tables: HDBTable SINA

Views: HDBView HDBTable HDBRole

CDS/HDBDD
Structures: HDBStructure
SQLScript AFL
Sequences: HDBSequence SQL
Views
Roles: HDBRole
2013 SAP AG or an SAP affiliate company. All rights reserved. 26
Development model

UIS
CDS Core Data Services SAPUI5
Data Definition Language XSJS XSODATA

Query Language XSXMLA


SINA
Expression Language
HDBTable HDBRole

CDS/HDBDD

SQLScript AFL
SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 27


Development model

UIS
Data Intensive Logic
SAPUI5
SQLScript / SQL
XSJS XSODATA
HANA Views
XSXMLA
Attribute
SINA
Analytical
Calculation HDBTable HDBRole

Application Function Library (AFL) CDS/HDBDD

Business Function Library (BFL) SQLScript AFL


SQL
Predictive Analytics Library (PAL) Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 28


SAPUI5

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, Table, Desktop
2013 SAP AG or an SAP affiliate company. All rights reserved. 29
The SAP HANA repository

Object management, versioning and transport

Software component delivery and patching

Built-in support for translatable texts

Support for server based development

2013 SAP AG or an SAP affiliate company. All rights reserved. 30


SAP HANA Application
Services Architecture
Lightweight architecture

2013 SAP AG or an SAP affiliate company. All rights reserved. 32


Architecture in more detail: SAP HANA XS Engine Process

2013 SAP AG or an SAP affiliate company. All rights reserved. 33


End to end architecture

2013 SAP AG or an SAP affiliate company. All rights reserved. 34


XS New Features SP6: Regi support

With SP6, the Regi command


line tool will be supported for
customer and partner use.
Regi provides an interface to
the SAP HANA Repository for
operations like check in / check
out, etc.

2013 SAP AG or an SAP affiliate company. All rights reserved. 35


Distributed XS

Distributed Configuration
N active servers in one cluster
M standby server(s) in one cluster XS Node 1

SAP Web Dispatcher

Shared Storage
XS Node 2
Approach
Operational
XS Engine service can run on all nodes of the XS Node 3
SAP HANA system XS Node 4
SAP Web Dispatcher deployed in front of SAP HANA
Round-robin load balancing approach XS Standby Node

Benefits
Maximized concurrency for requests going through XS

2013 SAP AG or an SAP affiliate company. All rights reserved. 36


Distributed XS: Failover

Distributed Configuration
N active servers in one cluster
M standby server(s) in one cluster XS Node 1

SAP Web Dispatcher

Shared Storage
XS Node 2
Approach
Operational
XS Engine service can run on all nodes of the XS Node 3
SAP HANA system XS Node 4
SAP Web Dispatcher deployed in front of SAP HANA
Round-robin load balancing approach XS Standby Node

Standby node becomes active and XS on it becomes


operational

Benefits
Redundancy provides for uninterrupted service (HA)

2013 SAP AG or an SAP affiliate company. All rights reserved. 37


Authentication for XS: new options for SP6

XS: authentication options:

- Basic Authentication

- Form-based authentication

- SAP Logon Tickets

- SAML 2.0 (Security Assertion Markup Language) NEW for SP6

- X.509 (standard for Public Key Infrastructure) NEW for SP6

2013 SAP AG or an SAP affiliate company. All rights reserved. 38


Content LifeCycle Management: new for SP6

CTS+ integration enhancement: exposed object


lists

HALM HANA Application Lifecycle Management


(content deployment across SAP HANA system
landscape)

2013 SAP AG or an SAP affiliate company. All rights reserved. 39


SAP HANA Studio Development
Perspective
SAP HANA Studio Development Perspective

Goal: Provide an extensible and


integrated development environment
supporting all development artifacts
necessary for building a HANA
application, covering development,
testing, debugging, supportability and
lifecycle management. As new and
existing technologies are being integrated
into HANA, a seamless integration of
the corresponding external tools in the
HANA Development Workbench should
be possible.

Target customer: HANA Application


Developer (Internal and external
developers). Including content
development scenarios.
2013 SAP AG or an SAP affiliate company. All rights reserved. 41
SAP HANA Studio Development Perspective

Utilizes standard Eclipse projects HANA


Specific, General SAP Projects, and even
3rd party ones

2013 SAP AG or an SAP affiliate company. All rights reserved. 42


SAP HANA Studio Development Perspective

Standard Eclipse Team Provider interface


for storing all objects into the SAP HANA
Repository

2013 SAP AG or an SAP affiliate company. All rights reserved. 43


SAP HANA Studio Development Perspective

HANA Specific Editors and


Debugger Enhancements (for
example: XSJS Server Side
JavaScript)

2013 SAP AG or an SAP affiliate company. All rights reserved. 44


SAP HANA Studio Development
Perspective Workflow
Create a new Eclipse Project from within SAP HANA Studio

2013 SAP AG or an SAP affiliate company. All rights reserved. 46


This is a true Eclipse Project persisted on the developers local
machine

2013 SAP AG or an SAP affiliate company. All rights reserved. 47


The project is then linked to the SAP HANA Repository

2013 SAP AG or an SAP affiliate company. All rights reserved. 48


After linked to a Repository, specific HANA packages are added as
folders

2013 SAP AG or an SAP affiliate company. All rights reserved. 49


The SAP HANA Repository is then treated like Git or Perforce and
Eclipse checks out the content for editing

2013 SAP AG or an SAP affiliate company. All rights reserved. 50


There is also an SAP HANA Repository Browser entire projects
can be checked out from there as well

2013 SAP AG or an SAP affiliate company. All rights reserved. 51


The Repository content is copied to the developers machine and
edited locally and offline

2013 SAP AG or an SAP affiliate company. All rights reserved. 52


Standard Eclipse editors as well as special SAP provided editors
are then utilized

2013 SAP AG or an SAP affiliate company. All rights reserved. 53


Upon saving in any Eclipse editor, a commit back to the SAP HANA
Repository is done automatically

2013 SAP AG or an SAP affiliate company. All rights reserved. 54


Full source merge, rebase, conflict resolution, and version
management is built in

2013 SAP AG or an SAP affiliate company. All rights reserved. 55


Changes are inactive when first committed; inactive testing is
planned for the future

2013 SAP AG or an SAP affiliate company. All rights reserved. 56


We also have direct interaction with other Eclipse based tools (such
as ABAP Development Tools and SAPUI5)

2013 SAP AG or an SAP affiliate company. All rights reserved. 57


SAP HANA Studio Development
Perspective New SP6 Features
SAP HANA Studio Development Perspective
New features delivered in SP6
Eclipse 4.2 Adoption

Usability Enhancements to Project Explorer and Repository Browser (Keyboard Shortcuts,


Confirmation Dialogs, Improved Error Display)

New Open Object and Object Search Dialogs

Core Data Services (Data Definition Language) New Source Code Based Editor

UI Integration Services Designer Integration

2013 SAP AG or an SAP affiliate company. All rights reserved. 59


Enhancements for check and activation

Global toolbar buttons and keyboard shortcuts for


Check (Ctrl+Shift+F2) and Activate (Ctrl+Shift+F3),
bound to SAP HANA Development perspective

Activation/Check of single active objects is now


disabled (because not supported by HANA
Repository)

Enhancements in Activation dialog (forced activation


modes)

Default behavior for auto-commit and checkout-on-


refresh has changed to on (can be switched off
manually via Preferences > SAP HANA Development
> Repository Access > Always synchronize... )

2013 SAP AG or an SAP affiliate company. All rights reserved. 60


Usability enhancements to Project Explorer and Repository
Browser

Open the shared project. There should be a


node "HANA System Library" containing a child
node "Catalog", which behaves like the
Catalog in SAP HANA Systems view

All Modeler editors are now integrated with the


Project Explorer
(Create / Edit / Validate / Activate)

2013 SAP AG or an SAP affiliate company. All rights reserved. 61


New open object and object search dialogs

Press keyboard shortcut Ctrl+Shift+A


(alternative: click on Quick search button
"Open HANA Repository Object" in toolbar)

Enter some search term matching one of the


files you just created in your project editor
should open

Search for some repository object outside of


your project read only editor should open

2013 SAP AG or an SAP affiliate company. All rights reserved. 62


Development model

UIS
CDS Core Data Services SAPUI5
Data Definition Language XSJS XSODATA

Query Language XSXMLA


SINA
Expression Language
HDBTable HDBRole

CDS/HDBDD

SQLScript AFL
SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 63


Core Data Services new source code based editor

New development artifact extension


hdbdd (Data Dictionary)

Define the schema, reusable types, and


multiple entities (tables) all within one
source file

Multiple catalog objects are generated


upon activation

2013 SAP AG or an SAP affiliate company. All rights reserved. 64


UI Integration Services Designer integration

Application Site Editor


now opens within SAP
HANA Studio instead of an
external browser

Activating an Application
Site no longer requires a
project refresh

2013 SAP AG or an SAP affiliate company. All rights reserved. 65


Server-Side JavaScript debugger: authentication in SP6

New for SP6: XSJS debugger now requires user


authentication, due to WebSocket implementation on
backend. In SP5, all XSJS debugging operations took
place automatically as a super-user.

2013 SAP AG or an SAP affiliate company. All rights reserved. 66


SAP HANA Studio Development
Perspective New SP7 Features
SAP HANA Studio Development Perspective: Roadmap Planned
for SP7
Native Repository interface implementation
Repository Browser Enhancements
Synchronization View
Project Explorer Enhancements
New Artifact Templates
Run Artifacts from the Studio
Inactive Testing
SAP HANA Text Editor
Mass Activation
Change Manager
CDS Graphical Editor

2013 SAP AG or an SAP affiliate company. All rights reserved. 68


Native repository interface implementation

Removal of dependencies upon REGI and the HANA


Client; simplify installation and setup

Improved performance by batching operations; better


tolerance for high latency connections between HANA
Studio and Server

Dependencies during activation are considered for


multiple object operations

2013 SAP AG or an SAP affiliate company. All rights reserved. 69


Repository Browser enhancements

Edit package contents from the Repository browser

Remove From Client essentially undo a Check Out


operation without risk of deleting content within the
Repository

Regenerate force runtime regeneration without the


need to go through activation

Better handling of deletion of content via activation


within the Repository browser

2013 SAP AG or an SAP affiliate company. All rights reserved. 70


Synchronization View

Integration of HANA Repository tools


into the standard Eclipse
Synchronization tool

View pending deletions on the server


after the content is gone from the
client

Compare differences between local


Repository Workspace and server
side Repository content

2013 SAP AG or an SAP affiliate company. All rights reserved. 71


Project Explorer enhancements

Projects contain both Catalog and Repository nodes


under the System Library

Additional Team menu options:

2013 SAP AG or an SAP affiliate company. All rights reserved. 72


New artifact templates

Wizards for the creation of the majority of all


development artifacts

Enforce naming rules and automatically apply file


extensions to greatly reduce common development
errors

2013 SAP AG or an SAP affiliate company. All rights reserved. 73


Run Artifacts from the Studio

Test XSJS, XSODATA and


HTML content directly from
the Project Explorer

Run in your default web


browser in a separate
window

2013 SAP AG or an SAP affiliate company. All rights reserved. 74


Inactive Testing

Ability to execute the inactive version of xsjs,


xsodata, xsjslib, or any static web content

Better support multiple developers working


on the same content at the same time as
they can test just their localized changes

Requirements:
Server must be running in developer_mode
On the client side set a cookie name
sapXsDevWorkspace to the name of your
Repository workspace

2013 SAP AG or an SAP affiliate company. All rights reserved. 75


Inactive Testing

Ability to execute the inactive version of xsjs,


xsodata, xsjslib, or any static web content

Better support multiple developers working


on the same content at the same time as
they can test just their localized changes

Requirements:
Server must be running in developer_mode
On the client side set a cookie name
sapXsDevWorkspace to the name of your
Repository workspace

2013 SAP AG or an SAP affiliate company. All rights reserved. 76


SAP HANA text editor

Generic text editor for all textual based


HANA artifacts without their own specific
editor

Default mapping in HANA Studio now uses


this editor

Always displays HANA System ID, Editing


User, HANA Hostname, and HANA Instance
Number in editor header

Creates a foundation for future artifact


specific features

2013 SAP AG or an SAP affiliate company. All rights reserved. 77


Mass activation

New activation dialog displays all


inactive objects across all projects
for the same repository workspace

New activation option under Team


menu to Activate All

2013 SAP AG or an SAP affiliate company. All rights reserved. 78


Change manager

Automatic recording of changes to


a change list

The ability to release changes for


just a sub-set of objects within a
package

Supports multiple streams of


development on the same
package(s) in parallel with reduced
risk of accidentally transporting
unwanted changes

2013 SAP AG or an SAP affiliate company. All rights reserved. 79


Development model

UIS
CDS Core Data Services SAPUI5
Data Definition Language XSJS XSODATA

Query Language XSXMLA


InA
Expression Language
HDBTable HDBRole

CDS

SQLScript AFL
SQL
Views

2013 SAP AG or an SAP affiliate company. All rights reserved. 80


CDS/HDBDD Syntax Changes - Associations

Associations define
relationships between
Entities (tables)

Not yet integrated into the


database/SQL but can be
referenced when defining
views within the same CDS
object

2013 SAP AG or an SAP affiliate company. All rights reserved. 81


CDS/HDBDD Syntax Changes - Views

CDS syntax expands to


include the definition of
views

Views can utilize the defined


associations between
entities

2013 SAP AG or an SAP affiliate company. All rights reserved. 82


CDS/HDBDD Graphical Editor

Added graphical
representation of the
HDBDD Entities and their
associations

Graphical mode is ready


only. All changes made to
the source code editor

Navigation into the source


editor from the graphical
display

2013 SAP AG or an SAP affiliate company. All rights reserved. 83


SAP HANA Browser Based
Development Tools
SAP HANA Web-based Development Workbench

SP6 introduced two


separate browser based
IDEs

SP7 merges both of


these back together into
a single application with
three sub-tools:
Editor
Catalog
Security

2013 SAP AG or an SAP affiliate company. All rights reserved. 85


SAP HANA Web-based
Development Workbench
Editor
SAP HANA Web-based Development Workbench
Editor

completely browser
based IDE for
lightweight creation and
editing of development
objects and debugging
without the need for
SAP HANA Studio

Direct URL:
/sap/hana/xs/editor/

2013 SAP AG or an SAP affiliate company. All rights reserved. 87


SAP HANA Web-based Development Workbench
Editor

Access to the full SAP HANA


Repository in a browser

Create, delete, and rename


packages and files

2013 SAP AG or an SAP affiliate company. All rights reserved. 88


SAP HANA Web-based Development Workbench
Editor

Code Editors with


Syn tax Coloring
Code Folding
Client side and server side
checks
No need to check out content
direct editing and activation
upon save

2013 SAP AG or an SAP affiliate company. All rights reserved. 89


SAP HANA Web-based Development Workbench
Editor Application Templates

Application creation wizards


which create the package as
well as the starting artifacts

Both mobile and desktop


SAPUI5 templates with the
correct bootstrapping for SAP
HANA

Automatic generation of
.xsapp and .xsaccess files

Special UI5 templates for


injection into existing HTML
pages as well

2013 SAP AG or an SAP affiliate company. All rights reserved. 90


SAP HANA Web-based Development Workbench
Editor Multi-File Drop Zone

Mass upload multiple files at a time


to a content repository package

2013 SAP AG or an SAP affiliate company. All rights reserved. 91


SAP HANA Web-based Development Workbench
Editor Multiple Editors

Multiple Editor tabs or the ability to


open an editor as its own browser
tab

2013 SAP AG or an SAP affiliate company. All rights reserved. 92


SAP HANA Web-based Development Workbench
Editor Direct Test

Test html pages, xsjs, and xsodata


services directly from the editor in
the browser

Including special mobile device


emulation modes for testing

2013 SAP AG or an SAP affiliate company. All rights reserved. 93


SAP HANA Web-based Development Workbench
Editor XSJS Debugging Support

Set Breakpoints
from the editor

Interactive server
side debugger
running in-place in
the browser

View and change


variable values

2013 SAP AG or an SAP affiliate company. All rights reserved. 94


SAP HANA Web-based Development Workbench
Editor Search

Global repository search

2013 SAP AG or an SAP affiliate company. All rights reserved. 95


SAP HANA Web-based Development Workbench
Editor Versions

Access to version management


of objects

Two way comparison editor

Select any two server versions


for comparison

2013 SAP AG or an SAP affiliate company. All rights reserved. 96


SAP HANA Web-based
Development Workbench
Catalog
SAP HANA Web-based Development Workbench
Catalog

Also access the SAP HANA


Catalog

View Tables, Views,


Procedures, Functions, etc
and their Content

Direct URL:
/sap/hana/xs/catalog/

2013 SAP AG or an SAP affiliate company. All rights reserved. 98


SAP HANA Web-based
Development Workbench
Security
SAP HANA Web-based Development Workbench
Security

Also access User and Role


Details

Assign roles to users and


perform basic user
administration tasks

Direct URL:
/sap/hana/xs/security/

2013 SAP AG or an SAP affiliate company. All rights reserved. 100


SAP HANA Web-based
Development Workbench
Trace
SAP HANA Web-based Development Workbench
Trace

Access to the developer


centric server trace files

Direct URL:
/sap/hana/xs/trace/

2013 SAP AG or an SAP affiliate company. All rights reserved. 102


SAP HANA Web-based
Development Workbench
Feature Map SP6<->SP7
Repository Browser

SP6 SP7

2013 SAP AG or an SAP affiliate company. All rights reserved. 104


Project Browser

The project browser from the


SP6 tools has been removed

Decision that projects are an


Eclipse concept and should
only be used from within the
HANA Studio

2013 SAP AG or an SAP affiliate company. All rights reserved. 105


Catalog Browser

SP6 SP7 - /sap/hana/xs/catalog/

2013 SAP AG or an SAP affiliate company. All rights reserved. 106


Security Browser

SP6 SP7 - /sap/hana/xs/security/

2013 SAP AG or an SAP affiliate company. All rights reserved. 107


Trace Browser

SP6 SP7 - /sap/hana/xs/trace/

2013 SAP AG or an SAP affiliate company. All rights reserved. 108


Delivery Units

SP6 SP7

2013 SAP AG or an SAP affiliate company. All rights reserved. 109


SQL Console

SP6 SP7 Now embedded in Catalog tool

2013 SAP AG or an SAP affiliate company. All rights reserved. 110


Project Templates

SP6 SP7

2013 SAP AG or an SAP affiliate company. All rights reserved. 111


OData Access (XSOData)

Access tables and views from the GUI with minimal effort
How? create an ".xsodata" service definition at design time:
service {
"hello.odata::otable" as Entries;
}

Then, access table content as JSON or XML via a URL:


Studio-based editor

Support for Create/Update/Delete: SPS6


XS

UIS RDL OData XSJS XMLA


HANA
SQL Views SQLScript MDX

Repo
Database

2013 SAP AG or an SAP affiliate company. All rights reserved. 112


Server-Side JavaScript (XSJS)

Familiar, open language, same for Client and Server Side


SAP HANA extensions:
Reusable code (import library)
SQL support

Studio-based editor/debugger
var conn = $.db.getConnection();
var pstmt = conn.prepareStatement( "select * from DUMMY" );
var rs = pstmt.executeQuery();

$.response.contentType = "text/plain";
if (!rs.next()) { XS
$.response.setBody( "Failed to retrieve data" );
$.response.status = $.net.http.INTERNAL_SERVER_ERROR;
} else { UIS RDL OData XSJS XMLA
$.response.setBody("Response: " + rs.getString(1)); HANA
}
rs.close(); pstmt.close(); conn.close(); SQL Views SQLScript MDX

Repo
Database

2013 SAP AG or an SAP affiliate company. All rights reserved. 113


TechEd CD103, 2013

Introducing River
(SAP HANA SPS7 Earlier Adopter)
Creating an application

T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 115


Creating an application

V2
V1 cv

T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 116


Creating an application

data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 117


Creating an application

access control (RBAC)


data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 118


Creating an application

business
logic (MVC)
control

access control (RBAC)


data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 119


Creating an application

business
logic (MVC)
control
data model

SQL over xDBC

access control (RBAC)


data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 120


Creating an application

OData over HTTP

business view
logic (MVC)
control
data model

SQL over xDBC

access control (RBAC)


data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 121


Creating an application

UI
mob
app app

OData over HTTP

business view
logic (MVC)
control
data model

SQL over xDBC

access control (RBAC)


data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 122


Creating an application, using River

UI
mob
app app

OData over HTTP

business
logic
control

access control (RBAC)


River
data
model V2
(DB)
V1 cv
trigger

sp
T1 T2 T3

2013 SAP AG or an SAP affiliate company. All rights reserved. 123


River vision

Simplify the experience of developing


SAP HANA Native Applications
River Language

River Programming Model

River Development Environments

2013 SAP AG or an SAP affiliate company. All rights reserved. 124


The River Language

Use River to create an integrated specification of the


data model
business logic
access control

River is familiar, declarative, object-oriented, and modular


River is cross-compiled into the most efficient HANA objects access
HANA database objects (tables, roles) control

Stored procedures (SQLScript, JavaScript)


OData and XS access controls

Developers focus on intent and leave optimization


and runtime configuration to the tools ("timeless software")

2013 SAP AG or an SAP affiliate company. All rights reserved. 125


HANA XS development model

HANA based development


1. Develop & Share Object management & versioning

2. Activate & Test Delivery and patching

3. Deploy

browser HANA DB

OData
River web
browser
Editor
XSJS
(Cloud) activate River
Repository package & deploy
compiler Auth
.rdl
workspace, roles
business app Studio save tables
developers views
DB objects

studio
River Editor
SScript stored
(on-premise) procedures

Activation
.rdl

2013 SAP AG or an SAP affiliate company. All rights reserved. 126


The River Language
(aka RDL)

%
x
Demo scenario: "River Airlines"

River Airlines Reservation System


List all flights
Book a seat

Implementation
Flight
flight id, from/to,
list of seats
Passenger
passenger details,
flight & seat reservation
Seat
status
City

2013 SAP AG or an SAP affiliate company. All rights reserved. 128


Entities and associations: the data model

Use "E/R modeling" to define your data model


Entities correspond to database tables
Associations describe relations between tables

Associations
entity Flight {
keys key flightId: String(8);
flightNum: String (3);
cityFrom: Association to City;
cityTo: Association to City;
depDate: LocalDate;
Primitive types, depTime: LocalTime;
enumerations, flightSeats: Association[0..*] to Seat via backlink flight;
structured types }

entity Seat {
key flight: Association to Flight;
id: SeatNum;
isExitRow: Boolean default false; Default Values
Status: enum {free; reserved;};
}

2013 SAP AG or an SAP affiliate company. All rights reserved. 129


Actions: the business logic

Actions describe the application's business logic


Local variables (scalar, streams)
Control statements (if, foreach, apply)
this
Integrated SQL queries

entity Seat {
flight: Association to Flight;
seatNum: SeatNum;
isExitRow: Boolean default false;
seatStatus: SeatStatus;
}
entity Flight {

flightSeats: Association[0..*] to Seat via backlink flight;

action GetEmptySeats() : Seat [] {


return select * from this.flightSeats
where Seat.seatStatus = SeatStatus.free;
}
}

2013 SAP AG or an SAP affiliate company. All rights reserved. 130


Extended queries

Use entity associations naturally in queries: id


extending SQL! Flight

FlightId SeatNum
temp16

entity Seat {
flight: Association to Flight; __FlightId Status
seatNum: SeatNum;
isExitRow: Boolean default false; Seat
seatStatus: SeatStatus;
}
entity Flight {

flightSeats: Association[0..*] to Seat via backlink flight; __temp16 = select T1. from Flights as T0
inner join "flights.Seat" as T1

}
action GetEmptySeats() : Seat [] {

}
return select * from this.flightSeats
where Seat.Status = SeatStatus.free; = on (T0."flightId" = "T0:flightSeats"."flight.flightId")
where "FlightId" = 12345;

__retval__ = select T2. from :__temp16 as T2 where T2."seatStatus" = 'free';

2013 SAP AG or an SAP affiliate company. All rights reserved. 131


Access control
role Dispatcher;

Define roles entity Flight {


CRUD and call access privileges key flightId: String(8);
flightNum: String (3);
Assign run-time users to roles cityFrom: Association to City;
cityTo: Association to City;
depDate: LocalDate;
depTime: LocalTime;
flightSeats : Association[0..*] to Seat via
backlink flight;
}

action OpenNewFlight() accessible by Dispatcher {



}

entity Seat {

action save() accessible by Flight;

2013 SAP AG or an SAP affiliate company. All rights reserved. 132


Interoperability

entity employee {

action is_legal_SAP_email(hdr: String): Boolean as HANAJS {%


breakouts: inline
var re = /^\S+@sap.(com|corp)$/; JavaScript or
SQlScript
return re.test(v_hdr);
%}
}
alias

entity Company as alias to sap.hana.catalog.ExtTable.T001;

view Company as SELECT FROM sap.hana.catalog.ExtTable.T001 { abstraction view


BUKRS as companyCode, BUTXT as companyName
}
Call XS JS directly

let StockQuotes: StockQuote[] = sap.hana.repository.XSStock.fetcher.getQuotes('http://www.nasdaq.com/quotes');

2013 SAP AG or an SAP affiliate company. All rights reserved. 133


OData

Open Data Protocol: a web protocol to query and


mobile
update data over HTTP, using JSON
browsers
client apps
River Entities and Actions are immediately exposed as
OData structures upon activation
Read (with filter), write, update, delete, call
Control via Namespaces and export keyword OData services

See further: http://www.odata.org

Entity
Data
Model

HANA

Database

2013 SAP AG or an SAP affiliate company. All rights reserved. 134


In Summary
Why River?

Simplicity, coherence, timelessness, interoperability


based on Entity-Relations, use a single language
for data modeling, business logic and access control

River compiler handles native code optimization


Write/extend native applications using modular, separate intent from
declarative, object-oriented design principles implementation!

UI integration
Expose RDL entities and actions instantly via OData

Productivity, cloud
XS integrated development experience

Integrated application server


XS runtime environment

2013 SAP AG or an SAP affiliate company. All rights reserved. 136


More about River

River will be available as a separate earlier adopter


program based upon SAP HANA SPS7

To learn more, or to participate in the ongoing


River beta program:

Join us at session CD163, here at TechEd


Contact one of the speakers

2013 SAP AG or an SAP affiliate company. All rights reserved. 137


Wrap Up
2013 SAP AG or an SAP affiliate company. All rights reserved. 139
Further Information

SAP Public Web


SAP HANA
SAP HANA Developer Center
SAP HANA Developer Online Help

SAP Education and Certification Opportunities


HANA Academy
openSAP Course

Watch SAP TechEd Online


www.sapteched.com/online

2013 SAP AG or an SAP affiliate company. All rights reserved. 140

S-ar putea să vă placă și