Forum > Networking and Web Programming

Network service

(1/4) > >>


I was requested to build an application which will print out accreditations for some sport event.
The problem is following, the front end is made by another company, and it is based on web application.
Our stuff logs to accreditation web app and selects let say "Jon Doe" and there is a print button .... now ... my idea was to create a service with Lazarus which will listen
on some port on particular laptop ... receive the data XML, JSON ....  and then print this data in special format, which matches the layout of accreditation ...
Is this even possible? I am not much of a web developer so before I ask this company I ask here for any ideas ....
Additional question is on report designer.
In the past I worked with delphi and rave reports, what would be best report designer for Lazarus, I need to print on exact layout with picture name and some other things.

Regards Mich

Ok, this look to complicated.

I have another idea. I need a signal from web site that my data is ready and I can go and take it.

Our stuff click a button on web, on the web site they generate JSON data of particular person.
New tab opens in browser (http://localhost:8080?ID=33), This sends ID 33 to my local service.
I fetch the JSON from web parse it, print it ... ...

Would this be ok? 

Regards Mich

What do you mean by "your stuff click a button"?  What is your stuff?

If you want to build a Lazarus application, you can use THTTPClient, with which you can send requests to and receive responses from webserver. Then you can do whatever you want with it.

Or to make "clicking a button" send some commands to your application, you may build your own webserver and set the button's action property to your webserver.

stuff >> staff ?

Listening in on the conversation between your existing (third party) client and the (third party) Web Service would be a bad idea, if you can, you should stop using it altogether !

My thought is, you have put your data in the hands of a commercial operation, you now must work with them. Ask them to provide an additional service whereby you can ask for the data for Jon Doe, get it as you say, as json and then, now you have it, do with it what you want.

But without the cooperation of the third party, you are in trouble.

Do you have a plan about what happens to your data if the company holding goes out of business ?


If i read the description:

a ) a web app have a button
b ) if somebody press this 'print button' a action is generated and the data is sent to your application

1 ) How is the data transfered - what kind of request is generated ? Must you poll and get or is the data pushed to your app ?
2 ) is there any handshake needed ? You must confirm if the data is read and/or printed correct

As egsuh wrote, your app can be a webservice, and is sitting and waiting for data. If data arrive you print and aknowledge the printout back.

More Questions are, is your app visible with a gui (using LCL) or like a service/demon (without LCL) working hidden. 


[0] Message Index

[#] Next page

Go to full version