We re-worked and restructured virtually the entire AFP source code to ensure enhanced stability for your Web applications at improved performance.
With this edition of AFP all of us tread new ground in the creation of dynamic Web pages. Earlier versions of AFP were always file oriented, i.e. that a specific URL request always returned a physical file. In this new version the processing of your data and files is application oriented. You now create a common Web application for your AFP pages that defines the basic parameters in a template. To allow improved control of AFP document behavior the application's metadata are be stored in XML files.
These are the key aspects and benefits of the new concept:
· Improved performance
· Higher stability
· Enhanced flexibility
· Increased security for your AFP documents
The new version is to a great extent downward compatible, thanks to the enhanced flexibility of the new concept. The exact interrelationships will be discussed further down in this manual.
New Functionality
· Speed optimization – AFP 3.0 is noticeably faster than AFP 2.4 and can process several million hits a day on a single machine. The entire design of AFP 3.0 is designed for stability and performance.
· No more COM interface – The ISAPI extension communicates directly with the AFP. This means that AFP can be halted at any time without having to stop the Web server, and there are no more conversion problems with COM.
· Genuine multi-threading – AFP 3.0 is a genuine multi-threaded VFP application. The memory demand is significantly lower than it was in AFP 2.4.
· Uploading Files
· Improved security – AFP 3.0 can be run with regular user privileges. Files need no longer be located in the wwwroot directory and are better protected against unauthorized access.
· ControlCenter – The ControlCenter provides an overview of all currently running AFP instances including the page being processed and the processing time. Instances can be loaded and unloaded at any time. Editing of the Active FoxPro Pages 3.0 configuration is done via the ControlCenter.
· Session management – The session management has been completely re-done and allows the creation of session-specific files, e.g. request results or generated reports. In the new version, the session is always unique (ID with 44 digits). The session including all related data is deleted at termination.
· Events – Each AFP page and AFP application provides numerous events that allow the execution of code during the loading of the application and before/after the invocation of a page.
· Error handling – A separate error handler can be deposited at the application level or per page. This lets you react to errors. The new version supports the possibility of a RETRY so you can retry multiple times if e.g. you run into problems trying to disable a record. This also lets you dynamically generate separate error pages, depending on the error.
· Demarcation of AFP applications – Each application is assigned its unique VFP data session and set of variables.
· Background programs clear away files that are not required.
· Plug-ins – Plug-ins let you expand the AFP almost ad libitum. Since the plug-in interface is well documented, you may develop and apply your own plug-ins or pass them on to other AFP developers.
· Pre-processor instructions – Code can be executed during compilation through a special syntax which even at that stage exerts dynamic influence on the AFP file to be compiled.
· Include instructions – At compilation, any and all files can be included. These in turn may include AFP code or further includes. That makes it easy to administrate shared elements (headers, menus etc.). Even if the changes were only made to the Include file, the page will be re-compiled.
· AFP 2.4 Compatibility layer – Allows the execution of AFP 2.4 applications. The compatibility layer also provides the FOX object.
· Object model – The design of the new object model follows the Active Server Pages (ASP) model. This minimizes the familiarization period for the developer and allows easy conversions from ASP code to Active FoxPro Pages.
· Debug mode – Now substantially simpler. AFP will run directly in the VFP 7 development environment on the Web server. You may therefore use all debug commands including SET STEP ON, ASSERT, DEBUGOUT, etc. directly in the AFP pages. Since AFP pages are invoked directly from the Web server you can test the pages in the application context. Whenever you invoke a page in the browser it will appear in the debugger.