The Advantages of More Power
Visual FoxPro is much more powerful than its predecessors. Object-oriented programming speeds up application development through features such as subclassing. The Visual FoxPro event model eliminates the need to use foundation READ or write event handlers. Optimizing your system settings and implementing Rushmore technology improves the performance of Visual FoxPro.
Harnessing the Power of Object-Oriented Programming
Using the Visual FoxPro object model, you can employ all the features of object-oriented programming including inheritance, encapsulation, polymorphism, and subclassing. For details about object-oriented programming with Visual FoxPro, see Object-Oriented Programming.
You can speed up application development by using classes. For example, you can create a basic form, toolbar, or page frame by using the form, toolbar, or page frame base class provided with Visual FoxPro.
Then you can reuse your code and forms by subclassing the classes you defined. For example, you can subclass the Form base class to create a custom class that automatically gives all the forms in your application the look and feel you want.
The Visual FoxPro class model gives you extensive control over the objects in your application. You have as much control of the appearance and behavior of objects on forms at run time as you do in the Form Designer at design time.
With Visual FoxPro, you can create classes visually with the Class Designer or programmatically with the DEFINE CLASS Command. For more information, see Object-Oriented Programming.
Handling Events with Ease
With Visual FoxPro you can create fully event-driven applications. You can access all standard Windows events such as mouse movements that permit dragging or dropping objects. You can control events visually through the Properties window or programmatically through the Visual FoxPro language. For more information about the event model, see Understanding the Event Model.
Testing and Debugging Immediately
Using the debug environment you can test and debug your code at the same time you design each component of your application and write the code. The Visual FoxPro language has been enhanced to include support for debugging capabilities, collection properties, checking the lock status of files and the current record, Value tips, and more. Also, the debugging tools work independently from the main application and do not interfere with the interface you are trying to test.
Test as You Design The enhanced Visual FoxPro development environment gives you more power to test your component design and code. For example, if you are designing a form, you can click the Run button to run the code. If you want to change something, just click the Design button and make your changes.
Catch Syntax Errors Early The editor now features color-coded editing: you can specify colors for syntax, normal text, variables, comments, and more in the Edit Properties Dialog Box. If you mistype a command or keyword, you'll know right away because it's the wrong color.
Debug with Power
You can debug and monitor your application components more easily in this version of Visual FoxPro using the Debugger Window.
- View Properties of an Object In the debugger you can view the elements within a collection or array using the Watch Window to show a hierarchical display of an object's properties.
- Trace the Execution Process of Your Code In the Trace Window you can see each line of code as it executes and check the values of all variables, properties, and environment settings.
- Control Execution with Breakpoints Using breakpoints you can control when execution stops using one of four types of breakpoints. You can stop at a particular line, when a certain value changes, if a condition evaluates to true, or if a condition for a certain line is true.
- Set Asserts and Display Assert Messages You can use the ASSERT Command to specify conditions that verify that the code is running properly. When an error occurs, the Debug Output Output Window records the message.
- Check the Current Value of a Variable To quickly check values you can place the cursor over a variable in the Trace Window to display a Value Tip.
- Watch and Change Values In the Watch Window and Locals Window you can change values for properties or variables while you run the code.
- Display Output from Message Requests In the Debug Output Window you can conveniently display interactive or coded information requests in a separate window from the active window or screen.
- Use a Coverage Log File In the Debugger Window you can use the coverage option to log the execution information about your code such as how long the line took to execute, the line number, and more.
For more information about testing and debugging your application, see Testing and Debugging Applications.
Optimizing Your System
Visual FoxPro brings you improved performance across all these product areas:
- Engine
- Form/Object
- OLE
- Client/Server
- Wizards/Builders
- Language
You can also improve performance by enhancing startup speed and optimizing SET commands. For more information about optimizing your system, see Optimizing Your System.
Optimizing Applications with Rushmore Technology
You can dramatically improve the performance of queries by using Rushmore technology. Rushmore is an exclusive technology for rapidly selecting sets of records from tables. It can reduce query response times from hours or minutes to seconds. For more information about using the Rushmore technology, see Optimizing Applications.
See Also
Overview of Visual FoxPro Features | Application Development with Several Developers | Object-Oriented Programming | Rapid Application Creation | Debugger Window