Languages

Menu
Sites
Language
Server side language for DB server connection

Can I write PHP codes in html file in tizen studio?

or Can I use Node.js in js file in tizen studio?

or any other ways to connect DB server in tizen web app?

 

I have cloud Linux Ubuntu. And I am making DB server for communicate between webapp and DB server.

How can web app send datas to DB server?

I want to make server and web app for data communication by using server side language and Linux server's IP address.

What is the usable server side languages in tizen studio web app?

The web app be able to send datas to DB server and select(lookup) attributes from DB server.

 

Is there any usable source code in tizen web app?

Responses

3 Replies
André Reus

hi, As far my knowledge till now in Tizen these are not possible... You can't write write PHP, NodeJS or any other server code in Tizen web app. 

You have to build a server and host it to a public domain or a real ip or a local ip ( for locally use). You may build a REST server or any other type.

Your server will communicate with Database server (which is hosted on a different server or in same server with different port). 
After that you will call your server from Tizen app using Ajax/HTTP Request/XMLHttpRequest... 

An example of Tizen app communicate with REST server ... https://stackoverflow.com/questions/40590871/auto-generated-code-from-rest-viewer-not-working-in-tizen-idewearable-web-app/40602735#40602735

And here you will get some idea about better frameworks for REST server

https://www.gajotres.net/best-available-java-restful-micro-frameworks/

https://nordicapis.com/5-lightweight-php-frameworks-build-rest-apis/

 

명훈 심

Do I have to install the framework on Linux server(my server) to use the rest API?

And is it possible to write Linux IP address instead of url?

url: "http://rest-service.guides.spring.io/greeting",
url: "115.68.xxx.xxx",

1. Make the rest API server on Linux server.

2. Write ajax or http request or xmlhttprequest codes on js file in tizen web app for call the rest API server.

3. Make connection between the mariadb on Linux server and rest API on Linux server. (Do not need PHP???)

4. Communicate between web app and DBserver.

 

Is the above procedure correct?

Is the above procedure correct?

 

André Reus

1. Yes..Make the REST API on Linux Server

2. Request from Tizen App

3. You can use PHP/Java/C#/NodeJS etc....

4. Tizen Web app will communicate with REST Server ..and REST Server will communicate with DB Server (see the image)