Page 1 of 1

JSON Server Side with FiveWin

PostPosted: Tue Mar 03, 2015 9:25 pm
by byron.hopp
Has anybody created the server side for JSON with Harbour/xHarbour and Fivewin?
Is this possible?

Any examples of communicating with any JSON service from a Harbour/xHarbour and Fivewin application?
I have tried this quite a bit using oHttp, but as of yet to succeed.

Byron ...

Re: JSON Server Side with FiveWin

PostPosted: Wed Mar 04, 2015 2:26 pm
by Carlos Mora
Hi Byron,

AFAIK, two choices for the server side comes to mind: writing a CGI program and use it together with Apache or another web server, or using Harbour's Httpd and build the whole server by yourself.
Depending on the requirements, you should use one of another. Using CGI is easier, you don't have to deal with the issues related to the http protocol that is up to the webserver, and you just write the specific code to produce the JSON response.
On the other hand, Harbour's httpd may be a little bit more complex but it will be faster, and you can have full control of the whole thing.

I have no examples for JSON in Harbour, i've used it only in php apps.

From the client's POV, you can 'consume' any kind of services including XML, JSON or whatever, using the TIP library from Harbour's project, or using libCurl. I'm currently using libCurl with great success, connecting to AEAT services (the spanish IRS).

JSON processing should be easy, there are function already written in the Harbour Project to deal with it.

May be you can tell a little bit more about your project so having a closer idea may help to be more specific in the answer.

Re: JSON Server Side with FiveWin

PostPosted: Wed Mar 04, 2015 2:43 pm
by byron.hopp
I'm currently using xHarbour, where can I get a copy of the Tip Library, and a listing of its contents (classes, methods, and functions). I never heard of this.

Thanks,

Re: JSON Server Side with FiveWin

PostPosted: Wed Mar 04, 2015 2:51 pm
by byron.hopp
To better describe my project. I was hoping to build a generic JSON interface to work with MS Sql. In my case I was describing the data with a little more detail to enable the creation of a recordset on the remote side and I would fill the disconnected recordset with the json data. I started with just reading data from an incremental search we were working with. The speed was suprisingly fast. Ran into some problems with special characters, never solved.

I have used SOAP in other occasions but because Microsoft stopped supporting the SOAP Toolkit some of my customers show concern.
I never liked having to install the toolkit, I always wanted to use vanilla Harbour / xHarbour / Fivewin when utilizing SOAP, or JSON.

Re: JSON Server Side with FiveWin

PostPosted: Thu Mar 05, 2015 11:09 am
by Carlos Mora
Hi Byron,

byron.hopp wrote:I'm currently using xHarbour, where can I get a copy of the Tip Library, and a listing of its contents (classes, methods, and functions). I never heard of this.

Thanks,

I think TIP library started being part of xHarbour Contribs and then it moved to Harbour. Since then it improved a *lot*.

You can checkout the SVN/GIT Harbour repository, in the contrib directory you will find great pieces of brilliant code, I _DO_ recommend you to take a look.

In order to your concepts about a JSON client to a MsSQL server, I have in mind more or less the same, but based in MySQL.
I built my own classes to simplyfy the access to a local server, and the next step will be (in a not so near future) to rewrite the connection part using a php counterpart on the server side, so i can use the benefits of ssl and https in the connection.

Re: JSON Server Side with FiveWin

PostPosted: Thu Mar 05, 2015 2:34 pm
by Enrico Maria Giordano
Byron,

byron.hopp wrote:I'm currently using xHarbour, where can I get a copy of the Tip Library, and a listing of its contents (classes, methods, and functions). I never heard of this.


The lib is tip.lib.

EMG