Use of Database in qx.Desktop

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Use of Database in qx.Desktop

Bober
Hi,
 
I have created a simple qooxdoo desktop application and want to store a text input in a Database (preferably MySQL).
 
Unfortunately, I have not found any information about such a matter in the documentation of the qx.desktop.
 
Is there any best practice to do so? How can it be done the easiest way?
 
 
Thanks for you support
 
 
Regards,
 
Bober
 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Use of Database in qx.Desktop

slah
Bober wrote
Hi,

 

I have created a simple qooxdoo desktop application and want to store a text input in a Database (preferably MySQL).

 

Unfortunately, I have not found any information about such a matter in the documentation of the qx.desktop.

 

Is there any best practice to do so? How can it be done the easiest way?

 

 

Thanks for you support

 

 

Regards,

 

Bober
Hello,
the best way IMHO is to use a json-rpc backend, there's a plenty of implementations in php, python, java etc in the qooxdoo website.

Regards,

 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Use of Database in qx.Desktop

Bober
Hi Slah,


thank you very much for your answer.
Could you please provide me with a simple example or link to the qooxdoo website including your suggestion. I cant find an example including the connetcion to the database using PHP or Java.

Thanks again for your support.

Regards,

Bober
Reply | Threaded
Open this post in threaded view
|

Re: Use of Database in qx.Desktop

Tom Saddul
This post was updated on .
In reply to this post by Bober
I am using Microsoft ASP.NET Web API 2.x at server side like the following ....


namespace SampleWebApi.Controllers
{
    public class DefaultController : ApiController
    {
        [HttpGet]
        [Route("getdata")]
        public IHttpActionResult GetData()
        {
            try
            {
                // Connect to MySQL here

                return Ok();
            }
            catch (Exception ex)
            {
                return InternalServerError(ex);
            }
        }
    }


In Javascript (I use TypeScript), I use qx.io.request.Xhr:

        var req = new qx.io.request.Xhr(baseURL() + "getdata");

        req.setMethod("GET");

        req.addListener("success",(e) => {
            var response = e.getTarget().getResponse();

           // process response
        }, source);
Reply | Threaded
Open this post in threaded view
|

Re: Use of Database in qx.Desktop

slah
You're welcome,
RPC PHP [1] is a contribution from Derrel Lepman. You can test it with the RPCExample [2] contrib too.

You may find other json-rpc implementations too [3].
[1] http://qooxdoo.org/contrib/project/rpcphp
[2] http://qooxdoo.org/contrib/project/rpcexample
[3] http://qooxdoo.org/contrib/project


Regards,

Tom Saddul wrote
I am using Microsoft ASP.NET Web API 2.x at server side like the following ....


namespace SampleWebApi.Controllers
{
    public class DefaultController : ApiController
    {
        [HttpGet]
        [Route("getdata")]
        public IHttpActionResult GetData()
        {
            try
            {
                // Connect to MySQL here

                return Ok();
            }
            catch (Exception ex)
            {
                return InternalServerError(ex);
            }
        }
    }


In Javascript (I use TypeScript), I use qx.io.request.Xhr:

        var req = new qx.io.request.Xhr(baseURL() + "getdata");

        req.setMethod("GET");

        req.addListener("success",(e) => {
            var response = e.getTarget().getResponse();

           // process response
        }, source);