View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Hi Mary,

The fact that your code is not object-oriented is not a problem at all.  However, you would have to separate your common logic from the user interface code, if you want to be able to use it in both the web and desktop versions of your application.  For example, you can't keep your business login in VFP Forms, if you also want to use it in a FoxWeb script.

The following is an excerpt from the FoxWeb FAQ:

Can I get my existing FoxPro applications to run over the web?

Because of the nature of the World-Wide-Web, there is no way you could take an existing FoxPro application and just get it to run over the web. Web browsers receive information in a language called HTML (Hypertext Markup Language) and send information back to servers using HTML forms. In order for FoxPro to communicate with web browsers it must be able to read the input of HTML forms, and format its output as HTML text. For this reason, the input and output routines of existing applications will have to be re-written. Other procedures handling the logic of the application, (e.g. queries, data-updates, etc.) can remain as is.

In some cases existing reports can be used without modification, by re-directing their output to a text file and then sending it to the browser (<PRE> tags have to be added at the beginning and the end of the text). This method works adequately if you have a large number of reports that you want to convert in a hurry, but the output appears just like an ASCII text dump with no formatting. If, on the other hand, you want to have aesthetically pleasing reports that take advantage of the HTML formatting tags, you will need to either include these tags in the reports, or use a different method to create HTML output.

FoxWeb Support Team
support@foxweb.com email
Sent by mary g on 10/19/2007 04:55:56 PM:
I need some help with figuring out how to port a desktop application to a web application given these constraints:
1. Desire to maintain a base of common code between desktop and web applications
2. Desktop code is mostly procedural, not object-oriented (originally written in FoxPro 2.6), and does not separate interface from business logic.
3. Preference to make as few changes to desktop code as possible

Is this feasible? What are my options? Any suggestions would be most apprecitated.

Mary