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.
|Tapping an employee record brings up
the details in read-only mode.
|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.
|Similarly, specifying the employee’s sex is more clear.
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.
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.
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.
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:
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()….).
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):
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.
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.
Sybase Unwired Platform (SUP) has a couple different abbreviations that my lizard brain STILL needs to latch on to…
- 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.
- 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…