Script API design guidelines (Talk)

Document created by mrogers on Dec 11, 2008
Version 1Show Document
  • View in full screen mode

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?


  • STRING

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?


  • OVERLOADING

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


  • RESERVED NAMES

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

Attachments

    Outcomes