John Yontz | For enums that are exposed by the API, we define API-specific definitions that are independent of the back-end representation in the database. We do this primarily to guarantee backward compatibility. In this case, ApiCompanyScope is the enum exposed in the API but CompanyScope is what we use in the back-end. Suppose we add another value to CompanyScope called "XYZ" in an upcoming release. We don't want to unknowingly expose this in the WSDL for any clients that are operating in backward compatibility mode. By having a separate ApiCompanyScope, we have tight control over what we expose, and furthermore, we can define any necessary adaptation logic. This also implies we can have separate ApiCompanyScope definitions for each release.
In short, for now CompanyScope and ApiCompany scope have the same values. But if they diverge at all on the back-end, we won't automatically break any backward compatibility. |
| Please sign in to flag this as inappropriate. |