Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running VFP 8.0 Application on the Web
Message
 
 
To
24/10/2003 11:59:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00825246
Message ID:
00842694
Views:
30
-------------
I want that

1. HTTPS requests send by a browser and received by Apache are sent to my VFP code.
2. HTML pages generated by my VFP code are sent back to user browser.

Which is the best way to implement this ?
-----------------

OK. IC what you want. I will give you three answers<s>.

Part I.

The first best way to research this might be to ask the following question on an Apache-based news list that is "Windows-tolerant". <s> By that I mean, don't ask someplace where everybody is a Unixhead and doesn't want to hear about COM objects. here's the question:

* Does Apache have a native method for invoke COM objects? *

The reason this is the right question to ask is that you're going to want to build your VFP code into a COM object, so now you want to have some method by which Apache knows to invoke that COM object.

When I've worked with Apache as the server, my objects have been written in java, and there are established, straightforward ways to tell Apache to instantiate a java object and continue the work from there, and having the java object provide the return information to Apache which then passes it to the browser.

But I bet that, when Apache is installed on Windows, a lot of people would like to invoke COM objects as well. This is probably in an FAQ someplace.

The answer might turn out to be something like "you install this particular java bean which is our generic way of handling this requirement. You instruct the bean about your COM object using this sort of XML configuration file. Your COM object should follow these standards to be acceptable to the bean... "

I really don't know for sure, but I imagine there is some scenario like this that is used when necessary.

Part II.

Let's assume, however, that the answer is "no, there is no obvious way to do this, Apache is xplatform through and through so we don't permit this directly."

Your next best shot to do this would be to use PHP as a thin scripting shell under Apache. PHP is a scripting language and it *can* indeed invoke a COM object, so you would have your scripting layer do pretty much nothing but pass the input on to VFP and then pass the results back.

The following is an introductory article to using PHP to interface with COM objects. You will note that the environment is Apache for the example in this article. PHP is really one of the most established ways of providing web server side code in an Apache environment so this indeed makes sense.

http://www.phpbuilder.com/columns/venkatesan20030501.php3

The article includes detailed descriptions of how to configure PHP to be able to use COM.

You could also install ChiliSoft, which is an ASP environment that runs under Apache, I believe. This is pretty much the same scenario as PHP but you have a thin ASP scripting layer instead of PHP. I'm sure you are aware that ASP script can make use of COM objects <s>.

As a third alternative for scripting, you might want to look at http://www.apache-asp.org/. Apache::ASP is an alternative to ChiliSoft for ASP use under Apache. I believe it's written in perl, which means that you install mod_perl as part of Apache to be able to use this stuff. That's fine, perl is a very established scripting language for Apache, just like PHP <s>.

I can't stand perl personally, so all I can tell you about this is that there is something called the perl Win32::OLE interface, which is how I know that perl can access COM objects <s>.


Part III.

Your VFP object can present a SOAP interface and actually be installed on a completely different application server, acting as a web service from there.

This approach will make it irrelevant whether you get something to invoke COM objects directly under Apache or not, since the application server doesn't have to have the same web server architecture at all <s>.

In some cases, this is a good idea, while in other cases it is a needless performance hit and over-complicates what you're trying to do.

But, FWIW, this scenario is the primary reason I asked you which version of Apache you were using. I can't give you good advice on how to do SOAP in a mixed (Apache and MS-based) environment without knowing which version of Apache, which version of the Apache SOAP framework, stuff like that. It is not particularly straightforward in the earlier versions.

You still haven't given me very much information about *your* background as a developer, so I don't know how deeply I'm going to get into this part without getting completely confusing <g>. If it turns out that you want to take this option, we can go into it further.


>L<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform