Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reuse VFP code in .NET?
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01061588
Message ID:
01063502
Views:
24
>If you wanted to go the vfp mtdll web route, you'd need to separate the application logic from the presentation (GUI) layer. Then your vfp logic can at least be re-used as a vfp web service (rewrite the presentation layer in .NET) or as a vfp web app just called from ASP.NET using something like ActiveVFP(rewrite the presentation layer in FrontPage or your favorite html editor). <

Separating the application logic from the presentation layer would not be that difficult. The application logic does have some references to form PEMs, but not so many that it would be hard to change. The idea is to replace the presentation layer with an ASP.NET front end that would communicate with existing VFP code (tweaked) that responds to data input and button clicks from the current VFP forms. For this approach to work two things need to happen that I don't know the answers to yet.

1. The ASP.NET front end and the tweaked VFP back end need to be able to communicate. The user has numerous options and can enter a fair amount of data -- select customer, select account, enter simulated interest rate, change simulation start or end date, etc. In most cases the application goes through calculations and passes back lots of simulation results. I think this will work if the VFP application logic (modified to be GUI-less) is built as a COM or COM+ server. The data could be passed via XML, as David has suggested. I am not sure of the exact mechanics of doing that but hope it isn't too tricky.

2. I really want the VFP back end to maintain a lot of state information between calls from the ASP.NET front end, so it doesn't have to go out to SQL Server and refresh all data every time the user does something. There is a lot of data involved and I think that would make response time disastrously slow. In the current application, the database is accessed only when a simulation results set is created, saved, or opened, or when a customer or account is added to the simulation. The form works interactively with data in VFP cursors. I would like to keep that approach (other than the form, obviously) but don't know whether I can or not. Can the VFP side stay alive between requests from ASP.NET?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform