SAP UI5 Presentation for SUP Hybrid Application – Part 1

This is the first of a series of posts for using the new SAP UI5 JavaScript controls and framework for SUP applications. This series will start with “see what you can have” to the details of coding and deploying to the SUP server.
This will be using an MBO tied to the ‘Employee’ table in the sample database (sampledb) in SUP to help retain familiarity with the other SUP samples.

Sample Application Overview:

The application has the ability to:

  • List all employees, then get the details for any employee record.
  • Find and display a single employee record (using the MBO object query ‘findByPrimaryKey’).
  • Create a new employee record.
  • Delete any employee record.
  • Update an employee record.

List & Update Employees

This uses the MBO object query “employee_findAll” to retrieve the data from the server. This then displays select details in an overview list. The user can then tap a specific employee to open a more detailed view with the option to either delete or update the record.  These screen images are snapped from my Android emulator – running the SUP 2.2 Hybrid Web Container talking to my SUP server.

The list of all employee records.
The list shows only a few details of the full record.
Initial Employee List for a typical application.
Tapping an employee record brings up
the details in read-only mode.
UI5_AndAppEmpDetail
Enter the employee update mode by tapping the Update button at the top of the screen.
The screen is then updated to be in read/write mode.
The image here has the “popover” field specific editor for the employee’s street address.
UI5_AndAppEmpUpdateStreet
Similarly, specifying the employee’s sex is more clear. UI5_AndAppEmpUpdateSex

Create an Employee

Creating an employee uses a slightly different UI approach to further show the non-traditional formats which are available in UI5. The approach here is to use the UI5 “input list”, which allows direct editing in the list control itself.

This picture shows the record with some fields filled in.

UI5_AndAppEmpCreateStart

Advertisements

JavaScript Debugging With Aardwolf

A JavaScript debugger from your desktop browser into the device (Android, iOS, BB6, WinPhone7).
A co-worker found this and she is writing up how to use this with SUP Hybrid Applications (running in the container on the device).  Yes – soon available on SDN.
This will greatly simplify debugging your applications while running on the actual hardware.

http://lexandera.com/aardwolf/

Yes, “aardwolf” is an “interesting name”, and the software is still pretty rough around the edges. However the promise is there. The author really did a great thing.

Remote Debug the Server Side ResultSetFilters and ResultCheckers

Somebody on the internal newsgroup asked how to use the Eclipse remote debug capability to debug custom ResultSetFilters and ResultCheckers – that are running on the SUP server itself.

Somebody internally beat me to the punch, but it is described in:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.sup.doc-SUP-1.0.1/projects/sup/tooling/en/source/t_mbo_writing_result_set_filter.html

Like I said, this is basically using standard Eclipse remote debugging, after the Unwired Server has been restarted in JPDA (Java Platform Debugger Architecture) mode.  You can set breakpoints and party in the code (using the brain-damaged Java debugger, but better than System.out.println()….).

(Update 19-July-2012)
On the internal newsgroup, one of the server people posted this helping bit:

You should be able to debug your filter running within Workspace by adding the same debugging JVM flags (all one line):

-Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

to UnwiredWorkspace.bat.

I believe you might need to use a different instance of Eclipse to run the debugger. I’ve seen some pretty strange behavior using the Eclipse debugger to attach to itself.

SUP on Android – Can Use Server Name Rather Than IP Address

Just noticed this on the SUP 2.1.3 client on Android.

Previously, we had to supply the IP-Address of the server rather than the more friendly server name.  It looks like that has been fixed and you can enter the server name.  I also had to use the fully resolved domain name, but I don’t know if that is because I am a VPN away from the server.

Reference:
https://reedteknik.wordpress.com/2011/11/06/uninstall-reinstall-a-package-on-android/

SUP and Different Abbreviations

Sybase Unwired Platform (SUP) has a couple different abbreviations that my lizard brain STILL needs to latch on to…

  1. PK – this has always always always meant “Primary Key” to me….
    In SUP this has a primary meaning of “Personalization Key”, with a minor secondary meaning of database-style primary key.  Driven by context – but whenever I see “pk_foo” my brain hits a speed-bump.
  2. CDB – from data federation systems and iAnywhere Mobilink, this means “Consolidated DataBase“.
    In SUP this means the “Cache DataBase“.  Of course their true meaning to the client device is very similar, so you can think of the CDB (cache db) as being a fancy CDB (consolidated DB).  The CDB (cache) has nice things like a ‘global CDB’ and fine control over cache groups…