Skip to content

Method Parameters

The New Codeless Method popup is used to declare method parameters. A parameter represents a value sent to the service from the client. A parameter has a name and a type. The name of the parameter is used in the method's logic to reference the value sent by a client. The type identifies the format of the data which can be used the client. For example, the image below shows a method declaration with two parameters: name of the String type and grades which is an array of numbers:

addStudent-method

Backendless supports the following parameter types:

Argument                Description
Boolean represents binary values such true and false.
String is a sequence of characters representing text.
Number a numeric value.
Array a linear collection of values. The types of values must also be selected when defining parameter type.
Any Object a value without a specific type. This is a "catch all" data type which can accommodate all supported types.
Data Object a value with the structure mapped to a data table from the Backendless database.

Both parameter name and type are significant for the following purposes:

  1. Backendless console generates a dynamic form used for method invocation. Both name and type are used to create an appropriate form element which can accept parameter value.
  2. Client SDKs generated by Backendless for a service include the code used to invoke the service methods. The generated code relies on the parameter information in order to create client code in a client language (Java/Objective-C/Swift/JavaScript) which closely matches what's expected on the server-side.