Solved

Can I use Java to develop an API?

Posted on 2001-06-28
5
280 Views
Last Modified: 2010-04-16
I have a requirement to develop an API for any language on any platform to connect MS SQL database.  Can I use Java?
0
Comment
Question by:cwchaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6234605
In general terms, yes you can I've personally found Java to be an excellent language for developing protocols.
Specifically regarding a protocol for accessing MS SQL are you talking about building a specific protocol on top of JDBC or something different?
0
 

Author Comment

by:cwchaw
ID: 6236332
Yes using JDBC, but how does the other language able to call the Java API.
0
 
LVL 92

Expert Comment

by:objects
ID: 6236435
Missed the 'any language' bit when I first read your question.
Not sure how you could implement a protocol in ANY language that would allow any language to use it.
There are certainly ways using JNI to allow other languages to use your Java implementation of the protocol, but you would have to implement the interface for each individual language. As would be the case if you implemented your API in C, or VB, or perl, or whatever.

Another thing you could do would be to proviude a command line interface to you protocol implementation, or a simple socket interface. Then other languages could simply call your Java implementation as if it was another application.
0
 

Accepted Solution

by:
rameshnut earned 100 total points
ID: 6237330
Hi cwchaw

In the simplest terms, you can write a JAVA BASED SERVER PROGRAM running on some port on some machine.
This JAVA SERVER connects to the MS-SQL database thru the JDBC INTERFACE.
Then implement a client in any other LANGUAGE and pass queries from this client to the JAVA BASED SERVER.
Thus your client is effectively communicating with the MS-SQL database itself.

Let me add that i DONT NOT CALL this an API feature.Its just a type of 'client-server' communication.

But the good news is this that, YES you can use java to get the functionality you want.

Why dont you go for CORBA.Its just the right thing you need.Though i havent done enough programming thru IDL i can say that its DEFINITELY possible to use java as an API,just as you want.

rameshnut
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6840448
Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, in the event new items have been created since this listing was pulled.

http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20142853.html
http://www.experts-exchange.com/questions/Q.20142859.html


PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange


P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SHA2 certs for IIS AND Java? 2 122
ejb stateless example 2 40
jmss example java 2 31
java mysql insert application 14 41
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question