Script API design guidelines (Talk)

Showing results for 
Search instead for 
Did you mean: 

Script API design guidelines (Talk)

Active Member II
0 0 949

Scripting API considerations

We have already dealt with date.   But how best to return a map, list, string, etc.   Over the script API?

Here is a 'straw man'.

  • MAP

Use ScriptableHashMap

  • LIST

Use arrays instead.     Currently the java script 'json' object is underpowered and does not convert json arrays to java script arrays.   Does this affect our choice to use arrays?


Are there any considerations here?  For example how do we ensure that its a java script string (so the java script string syntax works) rather than a wrapped java object?


Can't be used because most weakly typed scripting languages can't cope with it.


The 'delete' method name is reserved by JavaScript are there any other problematic names that we should avoid?