First of all what I want is quite complex, at least for me, but on the other hand it sounds exciting.
I have a software written in delphi, and I want a real time web based client for it.
The requirements:
On the server side
On the delphi side I think I could use ICS from Overbyte, to handle the requests. I know that THttpAppSrv from ICS pack can easily serve simple content, but what about Websocket, or how can I do long polling with it?
What do you think, is it a good combo ( GWT, SmartGWT on the client side, and ICS on the delphi side ), is there any sample project out there, or is there any other solution?
Update Thanks for the useful comments, I think I get closer to the solution. It's good to know that GWT can use a custom server, however I think Arnaud is right, GWT with it's 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 GWT RPC.
Update 2 I accepted Arnaud Bouchez's answer which looks me the best for the original question, however I think there's a better solution (if you change the requirements a little) for creating a client running in the browser for a delphi application. I just make a little comment here, to share the idea. Finally I used a node.js server, and connected it to my delphi app with the help of ZMQ.
About the HTTP server on the Delphi side, consider using the kernel mode http.sys server provided by Microsoft since XP. Should be faster than ICS.
For the AJAX part, take a look at Op4JS or up to come ElevateDBBuilder.
What is great with those solutions is that you can write object pascal code, and that this code will be translated to JavaScript. Not yet finished, but worth waiting a little for their release time.
Of course, more classic AJAX solutions do exist, like IntraWeb or ExtPascal. Both implement their own web server.
About GWT, AFAIK they are java libraries, deeply linked to the Java world. You won't be able to make it work with Delphi.
Edit about GWT:
GWT is a full Client-Server framework.
If you go with GWT, I suspect you'll end with a full Java rewrite of the application at some point. Or you'll miss most interest of GWT as a framework. It's your choice.
I'd rather rely on some more standard approach, using JSON for communication for instance as we do with our framework.
Have you checked out Intraweb? I have not used it extensively myself - but it seems to be quite popular for Delphi web apps.
I have made several Web Apps using TWebBroker with either IIS or Apache. It is Asynchronous, and allows you to easily port/share Delphi code with your other application. And it would support Ajax calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With