String Phobia in Software Development
String phobia in software development is different from the medical condition of Linonophobia!
It is when teams or individuals do not use strings and want to replace every constant with enums.
Probably using enums is acceptable if they will not really change; for example “days of the week” but if they keep changing and the component has dependencies that are affected by this change then I see no point in using enums. This is very annoying in enterprise environments where a component has a number of dependencies and a change will affect multiple silos.
The clients on the other hand can convert these string to enums if they want to.
SOA Cook Book says:
Keep the types in the canonical schemas somewhat flexible and general, as they will potentially need to absorb a variety of service entity definitions. For example, it’s probably fine to use an enumeration in a service schema, but use a string to represent that same type in a canonical schema. It is surprising how little we can actually agree on. Maybe your USState enumeration has 50 items, but maybe the enum in the schema of the service you need to integrate with includes Guam and Puerto Rico.