Tuesday, May 23, 2023

Smart Actions - Intelligent applications

 Smart Actions such as:

  1. may be in mailbox app, while scheduling a meeting provision to find an available room matching requested capacity and book it. This Smart Action should be available as type a head feature so that new user can also benefit from it. Also it should be visible in menu options.
    • Currently user has to know how to lookup for conference rooms and see the available ones and book
    • User may very well forget booking a conference room, so a reminder tooltip would be very useful
  2. Next

Friday, September 14, 2018

Returning variable number of fields in resource GET request

In the GET call we can mention the required list of field names, including parent child hierarchies. 

GET /resource?fields=field1, field3, parent1.child2
Here additional effort is fields list has to be parsed and each field need to be mapped to DB Entity field. For this simple convention is you can use same field names as in DB Entity class in above GET request.

In some cases fields list in GET call may be too many and exceed the allowable URL size then  profiles or views approach can be used. A named view consists of predefined list of fields, so each view name defines a unique list of fields. Let’s say for discussion, our views are AsiaPac (consists of 20 fields), Euro (consists of 40 fields), Australia (consists of 30 fields) etc, i.e. unique list of Resource fields are tied to each view name based on the relevance; now if I request for AsiaPac view then I would be given 20 fields, for Euro 40 fields and for Australia 30 fields. So my API usage can be 

GET resource/123?viewName=Euro

We can even provide this view definition (fields list) as resource and we should be able to view, add, update and delete view based on need basis.

Monday, July 2, 2018

SQL Tips & Quirks

  1. PL/SQL Anonymous block sample with DBMS_APPLICATION_INFO.set_module example & PL/SQL procedure invocation

Monday, September 11, 2017

JS add on's in developing Single Page Applications

Below are the common additional JS utilities, plugins or functionalities you may need while developing Single Page Applications:

jsPDF

A very handy utility to generate PDF's at client side. 
Support for image types jpg and png is included.

fromHTML plugin does not render images which are part of table cells. You can  use jsPDF fork https://github.com/Flamenco/jsPDF to address the same.

Tuesday, April 4, 2017

Android Development Tips

  1. How to access app files from internal storage
    • adb shell
    • run-as com.yourapp.package-name
    • Now you can navigate to the app_<app_name> folder and go through the files.
  2. Copy file from desktop to device sdcard
    • adb push d:\temp\delnow\console.log /sdcard
  3. Move file from sdcard to internal storage
    • adb shell
    • run-as com.sanjith.carcare
    • mv /sdcard/console.log ./app_CarCare/.
  4. Application log viewing
    • adb logcat | findstr "com.example.app"
    • adb -d logcat | findstr "com.example.app" > C:\file-path
  5. Next