Getting Started With SAP UI 5
Getting Started With SAP UI 5
Introduction
Download and unpack SAPUI5
Choose a home development location
Set up Apache
Configure Apache
Access your local SAPUI5 docs
Set up git for Windows
Clone sapui5bin
Relax
Author
DJ Adams http://www.pipetree.com/qmacro/
Introduction
Follow these instructions to download everything you need to develop and run SAPUI5 powered apps
on your local machine.
Within the unpacked zip, further unpack sapui5-static and demokit-static, ending up with something
like this:
Choose a home development location
In other words, where your JavaScript etc will go. Mine is c:\users\dadams\data\shed\.
Set up Apache
You need a local web server, use Apache.
Download from here: http://httpd.apache.org/download.cgi - I'm using the 2.2 branch, specifically
2.2.22, dowloaded as the Win32 x86 binary (httpd-2.2.22-win32-x86-no_ssl) from here:
http://mirrors.enquira.co.uk/apache//httpd/binaries/win32/
Install Apache accepting defaults. I didn't choose the install-and-run-as-a-service option, I just start
Apache when I need to from a shortcut (see below).
The Apache configuration is in httpd.conf, but it's in a default place that is not somewhere you'd
normally back up. So I keep my httpd.conf on my Dropbox and have set up a startup shurceortcut
'httpd_start' that starts Apache and uses the -f option to point it to my customised httpd.conf. It looks
like this:
and the highlighted line looks like this:
Configure Apache
Now it's time to configure Apache to serve stuff from the locations we've set up. Edit httpd.conf and
add something like this:
# SAPUI5 docs
Alias /sapui5-docs "c:/users/dadams/data/sapui5-1.8.4/demokit-static"
<Directory "c:/users/dadams/data/sapui5-1.8.4">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# SAPUI5 runtime
Alias /sapui5 "c:/users/dadams/data/sapui5-1.8.4/sapui5-static"
<Directory "c:/users/dadams/data/sapui5-1.8.4/sapui5-static">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Also set up Apache to listen on localhost only (to prevent prying network requests) and on a port of
your choice. Look for "Listen" and change appropriately, e.g.:
Listen 127.0.0.1:8888
I've also modified the default two log files to be written to c:\temp\ (so it's easier to type when in a
command prompt to get to them to tail them, etc). Search for ErrorLog / CustomLog and replace as
appropriate:
ErrorLog "c:/temp/error.log"
While you're editing httpd.conf, you might want to set up some reverse proxy config to help you with
the browser Same Origin Policy issue. Here I've set up /proxy/GWD URL path to be a proxy to the
GWD SAP system:
In order to use these Proxy* directives, you will need to uncomment the proxy modules (they come
commented out in the httpd.conf file as delivered):
Once you've got the config sorted, use your startup shortcut to start Apache. A cmd prompt should
open, with nothing in it. (I've set my startup shortcut to startup in 'minimised' mode so it doesn't get in
the way).
Clone sapui5bin
Open a git bash shell and clone https://github.com/qmacro/sapui5bin - specifically via the git read-only
link git://github.com/qmacro/sapui5bin.git
(In the screenshot here, I've just cloned it into c:\temp\ as it's only for illustration purposes) If you've
cloned it into your home development location you chose earlier (mine is
'c:\users\dadams\data\shed\'), you should now be able to go to various locations to see simple
SAPUI5 powered pages.
Example 1 http://localhost:8888/shed/sapui5bin/snippets/basic_panel.html :
Example 2: http://localhost:8888/shed/sapui5bin/conddatabind/phonetab.html :
Relax
Relax, all done! Coffee time. Make sure it's a decent coffee, i.e. not Starbucks or similar!