score:4

Unfortunately there is not much you can do about it. Most server side languages are case sensitive and therefore blindly changing the case of the client side counterparts for the server classes/interfaces is not an option.

As far as I can see there are two possibilities you can consider:

  1. If in your architecture allows you have limited amount of places that are responsible for transferring the data and serialization/deserialization of it and you have both client side and server side classes to describe the same data - you can implement you deserialization procedure that will automatically convert data into the instances of required classes with necessary name convention on client and server sides. The drawback is obvious overhead and sometimes complexity/slowliness of such transformation. Moreover if you are working within simple system you might be missing suitable place to run this transformation.

  2. Write down strict rules that stipulate that all data that are passed between server and client should follow one of the naming conventions, even though it will be different from the rest of the code. Then make sure everyone follows them. You might use tslint or such tools to ensure this rule. Drawbacks are somewhat messy code and extra steps required to ensure this rule.


Related Query

More Query from same tag