Versions Compared

Key

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

...

Type

Naming Convention

Example

JavaScript Object

oObjectName

oCompany

Integer

iIntegerValue

iCount

Float

fFloatValue

fTotalValue

Array

aArrayName

aCustomers

Boolean

bBooleanValue

bVisible

String

sString

sText

OData Sets

  1. FAB generates the GET_ENTITY_SET method in the Data Provider Class for you automatically, with a built-in CASE statement to deal with the Entity Sets that the code needs to handle. While it is tempting to keep all logic (for every Entity Set) in this method, it is not considered good (OO) practice - it is hard to maintain, difficult to find code and the method does not conform to the principle of "do one thing, and one thing well".
    Instead, we recommend that you code the logic for every Entity Set in its own (appropriately named) method, and simply call these methods under the relevant WHEN of the CASE statement. TheĀ GET_ENTITY_SET method should therefore simply act as a switching mechanism to direct the processing to the relevant method.

  2. We recommend naming your Entity with the singular version of the noun (like Customer or Company) and the Entity Set as the plural (Customers or Companies). An acceptable alternative would be using the pattern EntitySet, for example, CustomerSet or CompanySet instead.

  3. Please remember to implement manual pagination of the Entity Set for performance reasons when the method could return a large volume of data.

...