1

i need to create a web service to connect to an oracle database from a mobile application

i found some tutorial about creating a web service by using NODE.JS

my question : is it possible to create a REST web service with Node.js to connect to oracle database from my mobile apps ??

if you have an other idea how to create a rest web service using php plz tell me

2
  • Do you mean automatically, as in you just point something in node.js to your oracle db and it takes care of the rest, or just how to build a web service? Commented Mar 13, 2014 at 9:00
  • i need to build a rest web service to acccess to oracle db ( add , delete , ..... ) Commented Mar 13, 2014 at 9:02

2 Answers 2

3

Php is one thing: a language; NodeJS is another thing: a software platform used to build network applications in JavaScript. I assume you want to develop in JavaScript and not Php.

Yes, it is possible to do what you want. Look into the following packages:

In summary, express will serve as your web server, it will define the REST service endpoints, receive the mobile client's requests, fetch the data from the Oracle db with the help of the aforementioned db driver, and return this data to the mobile client.

You can get started fast with express by generating a base skeleton app just by running:

$ express myAppName
Sign up to request clarification or add additional context in comments.

2 Comments

thank you , my situation is that i have a web site developped by php with oracle db , i need to create a mobile app using phonegap to do the different operations in db ( add , delete ,edit ) , so i need to create a web service that i never work with it , i don"t know from where to start creating the webservice
Your Php site can stay as it is. You can build a Node.js app apart to provide the web service independently. Your mobile will just send the REST requests to the Node.js app.
0

Absolutely. For the REST server side of things, you might be interested in express or restify From the REST server / application you can use something like node-oracle to connect to the Oracle database.

2 Comments

thank you , after creating this web service , can i call it with ajax to fetch the data in an html page ??
Definitely. Client request (jQuery or otherwise) -> Server handles request (Node.js + Express or otherwise) -> Server queries Oracle (node-oracle or otherwise) -> response returned to Client

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.