Advertisement

site/language interactions

Started by March 25, 2008 03:27 PM
4 comments, last by frob 16 years, 8 months ago
Hello, I have a (probably simple) question, and I hope this is the right place to do it. Without getting too specific (and hopefully not too vague...) what I need are (probably) several programmers to make me several APIs (DDLs?) in several different languages. Basically, what I wan to release is code that people can hook into their applications that will allow them to communicate with my site/MySQl database, and this code will need to be ported to several programming languages (for reasons I can't explain, unfortunatly). What I want to know is, How complex is this task, generally? and How could I go about getting programmers? I'm almost certain i'll need to recruit online (there is nothing local). [Edited by - Random Blit on March 25, 2008 10:48:46 PM]
What do you mean you need to make several APIs?

If you can't use the native language, two options would be conditional compilation, or wrap your existing system to the new language.

The first would look something like this:
#if LANG==ENGint FunctionOne()#elif LANG==DEUint FunctieEin()#endif{...}#if LANG==ENGint FuctionTwo(bool x)#elif LANG==DEUint FunctieTwee(bool x)#endif{...}


The second would look something like this:
int FunctieEin(){  return FunctionOne();}int FunctieTwee(bool x){  return FunctionTwo(x);}
repeated for every function in your API. You'd need to similarly redefine your structures and other elements.


Both have benefits and drawbacks.


If you're just looking for translations of the UI, there are many localization companies out there who can easily translate your user interfaces.

It generally isn't a big deal, especially if you are in the good habits of using string lookup and using wide characters. If you have a lot of bad habits, though, it can take a bit of work to get your code ready for localization.
Advertisement
Well, big mistake on my part. By language, I meant programming language. I need several different frameworks written in several different languages to communicate with my database.
Quote: Original post by Random Blit
Well, big mistake on my part. By language, I meant programming language. I need several different frameworks written in several different languages to communicate with my database.


Ah.

Generate your object code as normal.

Most programming languages have a way to call functions in object code. You'll have to look those ways up for each language. For example, in C and C++ you make sure they have external linkage and have a compatible header. For C# you would need to use P/Invoke with data marshaling. For Java, you have to use JNI. Etc.

There is a really nifty tool called SWIG that will do most of this magic for you.
Alright, thanks. So will I probably need more than one programmer for this, and where can I find a programmer?
Visit the help wanted forum.


[warning] Make sure you follow the instructions in the top post of the forum.

This topic is closed to new replies.

Advertisement