1. West Wind Web Connection
for Visual FoxPro
by Rick Strahl
Making Waves on the Web with
Visual FoxPro
(since 1995)
West Wind Technologies
http://www.west-wind.com/
2. West Wind Web Connection
Extensive and extensible VFP
framework for Web development
Easy to install, easy to run!
Fast: Significantly faster than ASP
Works as COM or standalone EXE
Real-time, live debugging
Scalable
Highly efficient COM Thread Pool
Remote machine server support
Remote server management
3. How Web Connection works
Internet
Web
Server
IIS, Apache
Persistent
________________________
Web
Connection
Server
Database
Server and Form Request
wc.dll
_______________________________
ISAPI
ASP.NET
_______________________________
COM
File Based
HTTP/HTML Response
FoxPro
Code
Fox Scripted
HTML
HTML
GET/POST
HTTP Client
Browser
Desktop App
WC Framework
(Fox classes)
Your Code
(Fox business logic)
4. Messaging modes
How Web Connection communicates with the Web server
File Based Messaging
Running as a standalone EXE or inside VFP IDE
Development and interactive debugging
Simple installation and administration
Multi-machine operation w/o DCOM
COM Based Messaging
Deployment only option
Slightly faster
Can handle more traffic under load
Pool Manager provides scalability
Full remote administration and control of servers
5. File Based Messaging
wc.dll
ISAPI
ASP.NET
creates wc_*.tmp
Content file
waits for wc_*.ret
reads HTML result
from file
WC Server
(VFP)
Form with Timer
polls for wc_*.tmp
wc_*.tmp contains
request data
Reads data and
parses into
Request object
generates HTML
into a file through
Response object
creates wc_*.ret
on completion
Content File
Wc_xxx.tmp
contains all
form and server info
HTML File
contains the HTTP output
to return to the server
Wc_xxx.ret
result message file
6. COM Messaging
wc.dll
ISAPI
ASP.NET
creates instance
of COM Server
(one time – from
pool manager
after that)
creates content
string
calls COM Server
w/ content string
parameter
reads HTML return
value from
method call
WC Server
(VFP)
COM Server
ProcessHit() receives
content as string
parameter
Parses data into
Request object
generates HTML
to a string through
Response object
returns result
as a string
Content String
Request Info
contains all
form and server info
returns HTTP output as String
7. Web Connection Framework Core
wwServer
Visual FoxPro class
handles request routing on
incoming requests.
creates wwRequest
Contains all Server and
HTML Form Variables
Passed to
wwProcess
Developer entry point where
Web handling code is written.
HTTP/HTML Response string Each request maps to a method.
Uses
wwResponse
wwProcess uses this class
to create all output
Framework Classes
Message/Worker Classes
8. How your code gets called
wwServer
::ProcessHit()
Visual FoxPro form class
handles request routing on
incoming requests.
invokes
wwServer::Process()
Routes request to
your PRG file
MyProcess
creates new Process object
and calls Process method
wwProcess
Contains MyMethod() that
creates HTML output.
Class can contain
multiple methods.
To process this URL:
wc.dll?MyPRG~MyMethod
Or script-mapped:
MyMethod.map
Returns HTML object
9. Process Classes ontop of the Core
Raw Process Class – Process Methods
Raw and fast low level engine
Methods mapped to requests
Very easy model to understand
Basis for any other engines
Web Control Framework
Object orientated Page abstraction
Fairly complex model ontop of base Process engine
Sophisticated state management and visual editing support
Web Services
Allows calling Web Services through Web Connection
.wwSoap files or Process class implementation
10. Using COM Automation
Better performance under load
COM servers can be controlled
through the ISAPI extension
Servers load automatically
Remote loading and unloading
Auto-crash recovery on any failures or timeouts
Visual administration
Live online code updates
11. Creating COM Servers
No code changes
Web Connection detects mode
Adjusts objects for COM or File operation
Configure server with DCOM
Run DCOMCNFG
Find server by classname
Set Default Launch and Access permissions
Set Impersonation to Interactive User
MTS Components can also be used
Allows running within MTS transactions
Allows use of DLL servers
No performance benefits though!
12. Creating COM Servers (cont.)
Called with equivalent of:
oServer=CREATEOBJECT("MyProject.MyServerClass")
oServer.ProcessHit(”Query+String=wwDemo~Test")
Server should be compiled as Single
Use EXE COM object.
Pool Manager manages multiple live
instances of servers dynamically.
13. COM Pool Manager in Web Connection
Serverx
Single Use Exe
Instance 2
Clientx Clientx Clientx
Pool Manager
Persistent Client connections to the server
ISAPI DLL
Serverx
Single Use Exe
Instance 1
Serverx
Single Use Exe
Instance 3
HREF=“wc.dll?TestPage~Parm1”
14. Web Connection Administration
DLL Functions
Server Status
Session Management
Code Updates
wwMaint Class
Log Functions
Status Functions
Utility Function
Server Window
Server Status
Display Input/Output
View Logs
15. Web Connection & Community
We have a stable, mature product
We've put the Fox on the Web since 1995
Continually updated and kept up to date
Large number of installations
Strong support
We built it, we know it – we support it
We're very interested in customer feedback
Versions and changes are customer driven
Lively Web Connection Community
The West Wind Message Board
Lively peer to peer support
Deep technical discussions about Web development
Very high signal to noise ratio
We're proud of the very bright group of people
who contribute regularily.
16. Buying Web Connection
Pricing
$399.00 per server/developer
10% discount at this conference
Licensing
Physical Server based License Model
Single License
1 Developer License
1 Server License for 1 physical server
Runtime Licenses available
50 Servers/developers ($699)
Unlimited Servers/developers ($1,599)
requires one dev license
Come see us at the booth
Demos
Questions & Suggestions
Be involved