26
Introduction to AFP Power for your Internet Server

Introduction to afp

Embed Size (px)

DESCRIPTION

Intro to AFP session circa 2005

Citation preview

Page 1: Introduction to afp

Introduction to AFPPower for your Internet Server

Page 2: Introduction to afp

Copyright © 2005, F1 Technologies

Who Am I

Mike Feltman President F1 Technologies since

1990 Co-designer & author of Visual

FoxExpress framework North American AFP Distributor “.NET Project Rescue Specialist”

Page 3: Introduction to afp

Copyright © 2005, F1 Technologies

Agenda What is AFP? Why AFP? Creating an AFP Site Getting Started with Simple Pages Separating code from layout AFP Application Architecture The AFP ControlCenter Debugging AFP Versions Where and how to get AFP

Page 4: Introduction to afp

Copyright © 2005, F1 Technologies

What is AFP?

Active FoxPro Pages ISAPI Extension ASP work alike using VFP code

instead of VB Script or Java Script Optional ASP.NET like separation

of code from layout Complete OOP support

Page 5: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

Leverage VFP skills on the Internet

Use your existing classes

Take advantage of VFP performance

Integrate with desktop apps

Page 6: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

High performance and stability for mission critical environments

Support for clustering and high-availability web sites.

Page 7: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

Based on VFP Multi-threaded

without requiring MTDLLs

Automatically compiles pages

Handles millions of hits per day

No Slow COM calls No need for ODBC,

ADO or OLEDB

Page 8: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

No files stored in wwwRoot

Code is not visible to the client

Automatic session management

Support for HTTPS Integrates with

Windows security

Page 9: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

VFP Syntax ASP like Object

Model Use any web

development tool, VFP or Notepad

Use VFP’s debugging capabilities

No need to start and stop IIS

Page 10: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

Use your own or 3rd party VFP classes

Use VFP’s COM support

Anything goes with plug-ins

Page 11: Introduction to afp

Copyright © 2005, F1 Technologies

Why AFP? VFP Language Stable Fast Secure Easy Extensible Hassle-Free

Easy installation and configuration

Works with any ISAPI compatible web server (IIS, Apache, etc.)

Page 12: Introduction to afp

Copyright © 2005, F1 Technologies

Creating an AFP Site

Option 1 Create a folder in Inetpub\

wwwRoot Option 2

Create a folder anywhere Enable web sharing

That’s It!

Page 13: Introduction to afp

Copyright © 2005, F1 Technologies

Creating Simple Pages

helloworld.afp Create a new file in notepad with

the following text<html><body><% ? "Hello World" %></body></html>

Save it as helloworld.afp Navigate to it in your browser at

http://localhost/afpdemo/helloworld.afp

Page 14: Introduction to afp

Copyright © 2005, F1 Technologies

Creating Simple Pageslistcustomers.afp Create a new file in notepad with the following text

<html><title>AFP Customer List</title><body><%USE (_SAMPLES + [DATA\CUSTOMER])SCAN? Company? [<br>]ENDSCAN%></body></html>

Save it as listcustomers.afp Navigate to it in your browser at

http://localhost/afpdemo/listcustomers.afp

Page 15: Introduction to afp

Copyright © 2005, F1 Technologies

Creating Simple Pages

Additional Pages ListCustomersXML.AFP Menu.AFP ViewSource.AFP

ProLib Samples Sprechen Sie Deutsch?

Page 16: Introduction to afp

Copyright © 2005, F1 Technologies

Code Separation

Programming 101 – Separate Form from Functionality

Not well supported in classic .ASP Supported in ASP.NET .Code file with the same name as

the .AFP file can contain VFP code for the page. (test.afp code file = test.afp.code)

Page 17: Introduction to afp

Copyright © 2005, F1 Technologies

Separating Code From Layout Samples

CustomerList2.afp and CustomerList2.afp.code

Customer.afp and Customer.afp.code

Page 18: Introduction to afp

Copyright © 2005, F1 Technologies

AFP Application Architecture All of the .AFP files in a directory Requires an Application Id in .AFPA file

<application ID=“???"/> Files in directories other than the

application root can be made part of an application

Common Code can be stored in .AFPA.Code File Functions Class Definitions Events

Page 19: Introduction to afp

Copyright © 2005, F1 Technologies

AFP Demo Application Files AFPDemo.afpa AFPDemo.afpa.code CustomerTable.afp

Page 20: Introduction to afp

Copyright © 2005, F1 Technologies

The AFP ControlCenter

Displays Status for each Instance Allows Configuration Modification Send Requests to AFP without

going through Web Server

Page 21: Introduction to afp

Copyright © 2005, F1 Technologies

Debugging

DEBUG, SUSPEND, SET STEP ON & ASSERT are supported

DO AFP3Debug.prg Use regular VFP debugger Can also use ALF+F5 to open the

debugger Remember to exit “debug mode”

with SHIFT+F5

Page 22: Introduction to afp

Copyright © 2005, F1 Technologies

AFP Versions AFP Professional $499 US Supports up to 3

host names Cluster support Multiple server

and unlimited server licenses available

AFP Express $99 US Supports only a

single host name No cluster

support No plug-ins Limited

debugging support

Page 23: Introduction to afp

Copyright © 2005, F1 Technologies

Review Key Features:

VFP Language Stable Fast Secure Easy Extensible Scalable Complete debug support

Programming models: Script within HTML pages .Code files associated with pages VCX, PRG classes Application level code in .AFPA.Code Files

Page 24: Introduction to afp

Copyright © 2005, F1 Technologies

AFP Sites of Interest AFPFAQ.DE

Active FoxPro Pages FAQ – multi-lingual VFUG.ORG

Large, popular all AFP site Afpwiki.de

Open Source AFP based WIKI AFPHOSTING.COM

(German) site dedicated to AFP Hosting Prolib.de

Manufacturers of Active FoxPro Pages

Page 25: Introduction to afp

Copyright © 2005, F1 Technologies

Where to Get AFP

Download Demos and Documentation www.f1tech.com www.afpages.com

Purchase at www.f1tech.com

Page 26: Introduction to afp

Copyright © 2005, F1 Technologies

Thank You

For more info www.f1tech.com www.afpages.com Email [email protected]