Forum > Operating Systems
Question on porting Windows Delphi 7 application
kdtop:
The US Department of Veteran's Affairs (the "VA") has an extensive electronic medical record (EMR) system called VistA that is widely used. At one point it was the #1 EMR worldwide. The client for this, called CPRS, is written in Delphi, and the entire system is in the public domain. I have been active in a community called WorldVista for years which has a mission for making the EMR available outside the VA.
There has been interest in getting CPRS working on other platforms. I am one of WorldVistA's few Delphi programmers, and they have asked me about the viability of porting CPRS onto Lazarus. I think that most of it would be fine, but there may be some key sticking points.
Question: some of the custom controls used by CPRS involve windows messaging. I'm not sure why they were developed this way, but parts of the controls will send messages to other parts. How would this be handled on other OS's? Do all OS's have a messaging system and lazarus makes them all look the same? Or would the messages have to be tailored to the target OS?
Question: the key network part of CPRS ultimately depends on Windows wsock code to establish the connection. How would this be handled on an alternative OS? Is there a lazarus abstraction layer (i.e. in the LCL) that would take care of this?
Question: One of the components used is TWebBrowser. On windows, this is a wrapper for Internet Explorer (IE). I am assuming that there is an equivalent in Lazarus? One modification to CPRS makes use of the WYSIWYG editing feature provided by IE (I think it is called DHTML) via it's ActiveX interface Would I be correct that none of that would work with Lazarus?
In summary, I am trying to tease out the difference between the Delphi platform (and it's level of implementation in Lazarus) vs Windows dependencies.
Thanks in advance for feedback.
Kevin
Leledumbo:
--- Quote ---Question: some of the custom controls used by CPRS involve windows messaging. I'm not sure why they were developed this way, but parts of the controls will send messages to other parts. How would this be handled on other OS's? Do all OS's have a messaging system and lazarus makes them all look the same? Or would the messages have to be tailored to the target OS?
--- End quote ---
Other interfaces (not OS) don't use message passing mechanism actually, but AFAIK LCL emulates this. To make it work cross platform, you have to change the Windows messaging into LCL one. Note that not all Windows messages are implemented in LCL (yet). Better solution is to change the code to use the corresponding events.
--- Quote ---Question: the key network part of CPRS ultimately depends on Windows wsock code to establish the connection. How would this be handled on an alternative OS? Is there a lazarus abstraction layer (i.e. in the LCL) that would take care of this?
--- End quote ---
http://wiki.lazarus.freepascal.org/Networking
Synapse and lNet is the most popular, Indy is somewhere behind a little, and with its improvements over the years, fcl-net (and probably fcl-web) can also provide this functionality.
--- Quote ---Question: One of the components used is TWebBrowser. On windows, this is a wrapper for Internet Explorer (IE). I am assuming that there is an equivalent in Lazarus? One modification to CPRS makes use of the WYSIWYG editing feature provided by IE (I think it is called DHTML) via it's ActiveX interface Would I be correct that none of that would work with Lazarus?
--- End quote ---
Not really the same. This is the best one ever created. It's built on top of XPCom library and should provide functionalities provided by that library (perhaps including DOM tree manipulation).
theo:
Webbbrowser :
There is also QT Webkit:
http://wiki.freepascal.org/Webbrowser#QT_Webkit
On Windows, you can try to import 'C:\WINDOWS\system32\ieframe.dll' -> SHDocVw_1_1_TLB.
http://wiki.freepascal.org/LazActiveX#TActiveXContainer_early_binding
kdtop:
Thanks greatly for the replies.
snorkel:
For the socket part you could use Synapse instead which is fully cross platform and has lots of examples and decent docs.
There is stuff in FCL-Net but it's largely undocumented.
As long as this app does not use extensive 3rd party controls like dev express etc porting it to Lazarus should not be super difficult, won't be easy either but should be doable.
What I have done is use the Lazarus Delphi Unit conversion tool to convert the forms one at a time. Converting the whole app does not seem to work that great at least for me, but I had really good success converting one form at a time.
Navigation
[0] Message Index
[#] Next page