Hi,
I am trying to port a large and complex application to Linux. I have identified two approaches by which this can be done. I was hoping to get advice on which is the best approach, as well as the pros and cons of each approach.
The application consists of 2 layers:
Layer 1 -------- * Written in ANSI C * Queries a proprietary database
Layer 2 --------- * Consists of a GUI written entirely in MFC * End user uses this layer to communicate what search and retrieval he wants the Layer 1 to perform. * Some part of business logic is also mixed up in the GUI. - Many times the result set returned by Layer 1 is modified by Layer 2. - Occasionally the search string given by the end user is first modified in Layer 2 before being passed on to Layer 1. - Filters to queries are applied by Layer 2 code.
There are two approaches that I have identified to do the porting:
Option 1: Go the WINE way. -------------------------------------------------------- As expected, the ANSI C code of Layer 1 works perfectly within WINE. Not all parts of the GUI code of Layer 2 work in WINE. When a feature does not work, it does not mean that the problem is in its code. It could be in code which is some steps earlier. So I need to hunt and correct the errors by recoding the error producing code. The advantage is that perhaps this may be much lesser work than the second option.
Option 2: Go the Qtk way. -------------------------------------------------------- I have studied a white paper on Qtk. As far as I can see, almost all the components in MFC have been re-coded by Qtk people so that they can be complied to run on GNU/Linux. My task therefore involves a. examining all the code modules b. separating the code which deals with MFC from the business logic code. c. replacing the MFC code by Qtk code (The business logic code can be pasted directly in Qtk. Right?)
This is more work compared to Option 1 but there is one advantage. The same source code than can be recompiled for Mac and Unix versions also.
Does anybody on this group have practical experience of working with either of the two alternatives? What approach would you recommend I follow?
Thanks, Parul Mathur