Real-time client in real time for delphi application. AS?

First of all, what I want is quite difficult, at least for me, but, on the other hand, it sounds exciting.

I have software written in delphi and I want the web client in real time at this time.

Requirements:

  • Client Side Pure Javascript
  • Brilliant interface (GWT, SmartGWT)
  • Asynchronous connection between server and client. Ajax push, Long Polling, Comet, WebSocket?

Server side

  • scale ability

On the delphi side, I think I can use ICS from Overbyte to handle requests. I know that THttpAppSrv from the ICS package can easily serve simple content, but what about Websocket or how can I do a lengthy poll with it?

Do you think this is a good combination (GWT, SmartGWT on the client side and ICS on the delphi side), is there any sample project or is there another solution?

Update Thanks for the helpful comments, I think I'm getting closer to the solution. It's good to know that GWT can use its own server, but I think Arno is right, GWT with its own Jetty server is a complete solution, but unfortunately not for me. :) I think I need a server written in delphi which can communicate with the GWT RPC.

Update 2 I accepted Arnaud Bouchez's answer, which looks best to me for the original question, however I think there is a better solution (if you change the requirements a bit) to create a client that works in the browser for the delphi application. I will just make a short comment here to share the idea. Finally, I used the node.js server and connected it to my delphi application using ZMQ .

+6
source share
4 answers

About the Delphi-side HTTP server, consider using the kernel server http.sys server provided by Microsoft with XP. Must be faster than ICS.

For the AJAX part, look at Op4JS or before ElevateDBBuilder .

What is great with these solutions is that you can write the pascal object code and that code will be translated into JavaScript. Not finished yet, but it's worth the wait a bit until their release time.

Of course, there are more classic AJAX solutions like IntraWeb or ExtPascal . Both implement their own web server.

About GWT, AFAIKs are Java libraries deeply connected to the Java world. You cannot make it work with Delphi.

Edit about GWT:

GWT is a complete Client-Server infrastructure.

If you go with GWT, I suspect that at some point you will finish the complete redesign of the Java application. Or you will miss most of the interests of GWT as a basis. This is your choice.

I would prefer to use a more standard approach, using JSON for communication, for example, as with our map.

+3
source

Delphi, pure client-side javascript and a brilliant interface? You say Unigui !

+1
source

I worked on PHP, ASP, and Cold Fusion before, and wanted to do (almost) the same thing with Delphi. I started xxm . It has Delphi and HTML in the same files, and (re) compiles the library when you click the update in the browser. I made handlers for these libraries so that you can run them in IIS, Apache, InternetExplorer, Firefox, or directly from a Delphi-based HTTP implementation. (I also started working with the http.sys handler, but it will take a lot more work.)

Also, in relation to your question, I wanted to stream, I wanted what I output to be passed on to ASAP client-listener, so that you could do long pages, lengthy polls, etc. As for GWT and other client side script, I have successfully used prototype and jquery.

+1
source

Have you checked Intraweb ? I did not use it on my own, but it seems to be quite popular for Delphi web applications.

I have made several web applications using TWebBroker with IIS or Apache. It is asynchronous and makes it easy to port / share Delphi code with another application. And it will support Ajax calls.

0
source

Source: https://habr.com/ru/post/895888/


All Articles