I am building a web application using Javascript (in a browser), C # and Sql Server. Is it a good idea to have a consistent naming convention in all three languages?
For Javscript, it is best to use camelCase, but in C # and Sql Server it is TitleCase.
The problem is that when Javascript consumes and sends data to the C # / Sql server, the naming conventions are incompatible. So I have to write code to match them.
for instance
In Sql, I have a table called "Foo" with the columns "Name", "EmailAddress"
In C #, I have a POCO object called "Foo" that maps to this table with the "Name", "EmailAddress" properties and provides the api endpoint for the GET, this is JSON for example, "Name": "Joe Bloggs", " EmailAddres ":" joe@test.org "}
My Javascripts makes an ajax call to GET this JSON and map it to its own JSON Object, for example, {"name": data.Name, "emailAddress": data.EmailAddress}
This comparison between column and property naming conventions seems silly to me and would not be needed if all languages ββhave just agreed on a casing convention. Is there a better approach to this?