If you are wrapping an API which has different coding style guidelines to the programming languages you are using, do you create an interface that complies with the languages style guidelines or expose the implementation to the user of the API wrapper.
A specific example is for ruby and python variables are usually all lowercase and use underscores
my_variable = 'Hello World'
while in Java/C# camel case is the standard
myVariable = 'Hello World'
for instance the web service has a method to create a contact in json it would be
{contact: {contactId: 1, firstName: 'John', lastName: 'Smith', emailAddress: '[email protected]'}}
for instance do you create a class with the same variable names (in camel case)
class Contact:
contactId = 1
firstName = 'John'
lastName = 'Smith'
emailAddress = '[email protected]'
or in a method
def create_contact(contactId, firstName, lastName, emailAddress):
# make remote request
or do you follow style guidelines and then covert variables names when making a request
def create_contact(contact_id, first_name, last_name, email_address):
# convert variable names
# make remote request