Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a hobby project and it looks like there is need to have some API library (which in turn is a wrapper over existing http API) at least for two languages - JavaScript and Python, adding support to Perl would be nice as well.

The question is - what are the best practices for minifying the cost of supporting and developing of such multilanguage APIs? Is it better to choose one language and write just wrappers that for other ones? Or it's better do move slower but to implement thoroughly each method on each language.

share|improve this question

1 Answer 1

From my experience: If you have to write for embedded systems the core functionality is mostly C or something similar and therefor multi language support is likely to be realized with wrappers because Python, Java, Ruby and likewise are not 100% suitable for the task.

Did I get you right? You think about writing the whole functionality multiple times in different languages? Well, if so that means an order of magnitude more effort to test, because you cannot verify the "core" and once it's done compare the wrapper results with the expected ones from core test but have to write unit tests for each and every function multiple times.

So to me it feels like wrapping is the better choice.

You could have a look into git repositories of famous open source projects, to see what they did to have it ultra accessible.

By the way: Putting wrappers onto wrappers sounds like there might be some good use for the adapter pattern though.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.