Development mode — payments are simulated and emails go to the Dev Mailbox · Payment simulator
DDSP
Cover Object-Oriented Visual FoxPro — page spread 1 Object-Oriented Visual FoxPro — page spread 2 Object-Oriented Visual FoxPro — page spread 3 Object-Oriented Visual FoxPro — page spread 4 Object-Oriented Visual FoxPro — page spread 5 Object-Oriented Visual FoxPro — page spread 6 Object-Oriented Visual FoxPro — page spread 7 Object-Oriented Visual FoxPro — sample page Object-Oriented Visual FoxPro — sample page Object-Oriented Visual FoxPro — sample page

Master Visual FoxPro's object model and build a reusable application framework in VFP 9: DEFINE CLASS and visual class libraries, inheritance with DODEFAULT and NODEFAULT, PROTECTED and HIDDEN members, Access and Assign methods, containers and collections, BINDEVENT and RAISEEVENT, design…

Classes, Forms, and Reusable Application Frameworks in VFP 9

Read before you buy: the PDF here is a free sample — the first 20 pages of the 470-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.

Stop putting business rules in Click methods. Design Visual FoxPro applications with classes that are layered, testable, and easy to change.

Many Visual FoxPro applications that still run businesses every day grew one form and one program at a time. Logic lives in button methods, the same calculation is copied into several forms, PUBLIC variables carry state between screens, and every new rule feels risky. VFP has a complete object model — inheritance, encapsulation, visual class libraries, collections, event binding, structured exceptions, and CursorAdapter — and this book shows you how to use it deliberately.

This is a deep dive, not a beginner's tour. You already know tables, SELECT-SQL, and basic forms; here you learn how VFP's classes really behave and how to combine them into a mini-framework you can reuse: a base class library, business objects, a data service, form and control classes, an application object, a form manager, menus and toolbars defined by objects, and a unit-test harness written in VFP itself.

What's inside

  • VFP's object model: DEFINE CLASS vs visual classes (VCX), properties, methods, events, object lifetime, and object references
  • Inheritance done right: THIS, THISFORM, DODEFAULT(), NODEFAULT, and the scope resolution operator
  • Encapsulation: PROTECTED and HIDDEN members, Access and Assign methods, and _MemberData
  • Composition and containers, the Collection class, object graphs, and RAISEEVENT() and BINDEVENT()
  • Design patterns in VFP: factory, strategy, template method, observer, decorator, and mediator — applied to real rules
  • Business objects separated from the user interface, broken-rule collections, and workflow rules
  • A data access layer class, data sessions and their traps, and CursorAdapter subclasses for native and SQL back ends
  • Error handling in classes: TRY...CATCH...FINALLY, the Error event, ON ERROR, and exception objects
  • A base class library and reusable form, grid, combo box, list box, pageframe, and container classes bound to business objects
  • An application object, a form manager, and menus and toolbars driven by objects
  • Unit testing classes with a tiny test harness written in VFP, and testing forms without showing them
  • Refactoring legacy procedural code into classes with characterization tests, object lifetime and memory pitfalls, and a capstone mini-framework you can extend

One running example, start to finish. You rewrite OakDesk, the practice application of Oakhurst Dental Group, a fictional group of three dental clinics. OakDesk 1 is procedural code that still works but resists change; OakDesk 2 is built with classes: business objects that know the booking, insurance, senior-discount, no-show, and invoicing rules; a data service that is the only code that knows where the data lives; form and control classes that only present data; and an application layer that ties it together. The sample data is small enough to check by hand — every class and code sample in the book was run in Visual FoxPro 9 and checked against its printed output.

Honest and practical. The book targets Visual FoxPro 9.0 SP2, the final release, and notes where VFP 8 differs. It contains no invented benchmarks or statistics, and it points out the real quirks of VFP's object model — the ones that cost hours when you meet them for the first time. Every chapter includes complete code, Tips, Notes, Warnings, Try It Yourself exercises, and Key Takeaways, and the appendices give you a cheat sheet, a class reference with templates, a production checklist, and a glossary.

Format: PDF, 470 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. Requires your own licensed copy of Visual FoxPro 9. This book is independent and is not affiliated with, sponsored by, or endorsed by Microsoft Corporation.

Table of Contents

Part I — The VFP Object Model

  • Ch 1 · Objects in Visual FoxPro: The Object Model and the OakDesk Rewrite
  • Ch 2 · DEFINE CLASS in Depth: Properties, Methods, and Object Lifetime
  • Ch 3 · Inheritance: THIS, DODEFAULT, NODEFAULT, and the Scope Resolution Operator
  • Ch 4 · Encapsulation: PROTECTED, HIDDEN, Access and Assign Methods, and _MemberData
  • Ch 5 · Visual Classes: VCX Libraries, the Class Designer, and PRG Twins

Part II — Composition, Collections, and Events

  • Ch 6 · Composition and Containers: ADD OBJECT, AddObject, and Object References
  • Ch 7 · Collections and Object Graphs
  • Ch 8 · Events: Native Events, RAISEEVENT, and BINDEVENT
  • Ch 9 · Patterns in VFP, Part 1: Factory, Strategy, and Template Method
  • Ch 10 · Patterns in VFP, Part 2: Observer, Decorator, and Mediator

Part III — Business Objects and Data Access

  • Ch 11 · Business Objects: Separating Rules from the User Interface
  • Ch 12 · A Data Access Layer: The oakDataService Class
  • Ch 13 · CursorAdapter as a Class
  • Ch 14 · Validation and Business Rules: Broken-Rule Collections and Workflow
  • Ch 15 · Error Handling in Classes: TRY/CATCH, the Error Event, and Exceptions

Part IV — Forms and Controls as Classes

  • Ch 16 · Form Classes and the oakbase Library
  • Ch 17 · Data-Aware Controls: Binding Controls to Business Objects
  • Ch 18 · Grids as Classes: Columns, Dynamic Properties, and a Reusable Grid
  • Ch 19 · Combo Boxes, List Boxes, and Lookup Classes
  • Ch 20 · Pageframes, Containers, and Composite Controls

Part V — Application Architecture

  • Ch 21 · The Application Object and Global Services
  • Ch 22 · A Form Manager: Opening, Tracking, and Closing Forms
  • Ch 23 · Menus and Toolbars Driven by Objects
  • Ch 24 · Unit Testing Classes: A Tiny Test Harness in VFP

Part VI — Refactoring and the Capstone Framework

  • Ch 25 · Refactoring Legacy Procedural Code into Classes
  • Ch 26 · Object Lifetime, Memory, and Performance
  • Ch 27 · Capstone, Part 1: Assembling the OakDesk Framework
  • Ch 28 · Capstone, Part 2: Extending, Packaging, and Maintaining the Framework

Appendices
A · OOP in VFP Cheat Sheet
B · OakDesk Class Reference and Templates
C · Framework Production Checklist
D · Glossary

Book details

Detail
Pages470
FormatPDF (A4)
LanguageEnglish
LevelIntermediate to Advanced
Edition1st Edition (2026)
Download on this siteFree sample, first 20 pages (PDF)
Publisherthenexbooks

Files you get

PDF
Object-Oriented-Visual-FoxPro-Free-Sample.pdf
707.8 KB · version 1 · updated 15 Jul 2026

No reviews yet. Only buyers can review.

More from thenexbooks

Visit store
$9.00