Child pages
  • Server Side Scripting

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
title.spec file
"serverscript": "servoydefault/tabpanel/tabpanel_server.js",

 Server side scripting should contain API methods defined in the spec of the component/service. When a certain API is called from Servoy scripting, Servoy will first check if that API is defined server side. If it is, it will just call the server side API method. If is not (or component doesn't have server side scripting) will send a message to client requesting an API call as defined by client js file. Any message sent to client will also send all outstanding model changes so that client will be in sync with server (before API is called).

That file has that also the implementation of the api that is defined in the spec file, so you can handle complex things server side, this can be used as a performance enhancement so that the api call doesn't have to go to the client to execute at the moment the call comes from servoy code.

...