×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Synergy of VFP-desktop into the web-base
2

Synergy of VFP-desktop into the web-base

Synergy of VFP-desktop into the web-base

(OP)
Dear Team,

We know that several applications today can be integrated and run on the web by inserting code/scripts in HTML files, such as : javascript, CSS, PHP, etc. Are there references to code/script VFP inserted in the HTML file ...? so that it can be run through the web. As an illustration, to make messages in the HTML web we usually use javascript (alerts or sweetalert), while on the VFP desktop we use code messagebox.

Web-HTML: <script type = "text / javascript"> alert ("Hello world"); </script>
Desktop-VFP: MESSAGEBOX("Hello world")

In the development of database management applications that are more dynamic and complex, in my opinion making a web-base application with a combination of : html+javascript+CSS+PHP is relatively more complex than desktop VFP applications.

If there is a synergy of VFP scripts that can be inserted and run in HTML files such as : javascript, CSS, PHP, of course this will greatly help VFP programmers to adapt to the development of IT technology today, without having to migrate and learn more new applications on the web-base version, which of course requires extra time, thought and energy.

thank you

RE: Synergy of VFP-desktop into the web-base

It's an old hat - or several. There are even parts of the VFPinstallation itself dedicated to that topic.

There is foxisapi.dll, with which you can integrate executing VFP code from ISAPI capable web servers, which includes IIS and Apache and VFP Samples also include FoxWeb, a whole Webserver written in VFP.
All this is quite outdated but still works. Hosting based on this is lacking hosters, that'd allow adding that foxisapi.dll, but in a Microsoft based VM hosting you could use that. You can of course also use it locally, see Home()+"Samples/Servers".

People have done other things based on that and from scratch. For example Rick Strahl. While he has left VFP to join the .NET community his VFP/Web integration efforts are also very complete and still up to date. West Winds Web connect doesn't just help to bring the web into VFP applications but also is the foundation for building web applications with VFP.

Just a list of things: VFP2IIS, AFP(X), ActiveVFP.

As you are much more concerned about running VFP code than integrating into PHP or JS code, it'll perhaps interest you less, but VFP within JS is possible via OLE/COM on Windows, which excludes users on other OSes and of course, also requires installing your VFP COM DLLs.

And PHP hosted on Windows is capable to use an COM this way:

CODE

<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";

//bring it to front
$word->Visible = 1;

//open an empty document
$word->Documents->Add();

//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");

//closing word
$word->Quit();

//free the object
$word = null;
?> 

Notice: COM() only is part of PHP on Windows, so requires Windows Hosting. Also, this is using Word automation silently, you'll never be able to let clients use Word via their browser here, but can automate the creation of Doc files, and being capable to run word.application more general means to be able to run visualfoxpro.application when VFP is installed on the server as one possibility and, of course, creating COM Servers you write yourself as DLL or EXE and install on the server, too. It's much more feasible that way than installing the COM Servers at clients and use them there via JS, but for sake of completeness, in JS you can use a COM Server via:

CODE

var oleObject = new ActiveXObject('comserver.name') 

It's just very limited not only to Windows but also to the InternetExplorer Browser, and within that also requires to either allow ActiveX in general or have your OLE classes in the trusted zone. Therefore the serverside is a much easier route, as you can choose that and have that under your control.

The major recommendation goes to West Winds Web connect, regarding these things.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Synergy of VFP-desktop into the web-base

Quote (Ariswan)

in my opinion making a web-base application with a combination of : html+javascript+CSS+PHP is relatively more complex than desktop VFP applications.

It's more complex to provide users the same interactive GUI: on each user action, refresh just the parts of the form that need to change, not the full page like you typically see on a web site when clicking an hyperlink. To provide an interactive experience, you need AJAX and a lot of JavaScript, tied with HTML and CSS. The sum of these 3 technologies, plus the server side (being able to update some items on the page depending on user's specific context) makes it complex altogether. Today web developments generally require a stack of competences (HTML/CSS, JS, server-side) and 'full-stack' developers become more rare.

FoxInCloud generates a full AJAX web application from your VFP application: the web app behaves the same as your desktop app through generated HTML, CSS and JS. Server-side runs your app's code provided you've adapted it to run on either the web or the desktop (using the free FoxInCloud Adaptation Assistant).

The FoxInCloud Live Tutorial (http://foxincloud.com/tutotest/bs/) lets you see the generated code (HTML/CSS/JS) and the server-side VFP code.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close