Benefits of Object-Oriented Coding

ID: Q136768


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0


SUMMARY

The object-oriented Visual FoxPro language extensions provide you with much more control over the objects in your applications, at runtime as well as design time. These extensions also make it easier to create and maintain libraries of reusable code, giving you:

  • The ability to quickly add complex functionality to application components.


  • The ability to hide unnecessary complexity.


  • Easier code maintenance through inheritance.



MORE INFORMATION

Quickly Add Complex Functionality To Application Components

You can create visual or non-visual classes with functionality made accessible through methods and events. To incorporate this functionality, you need only drag the class to a form. Code associated with events is automatically run when the user interacts with the object. You can use a method by writing a single line of code.

Hide Unnecessary Complexity

Because a class can encapsulate sophisticated functionality and only expose the class through methods or events that occur in the user interface elements, you don't have to worry about the internal operations of the class. You need only be concerned with how to use the class as an integrated whole.

Easier Code Maintenance Through Inheritance

Changes made to a parent class are inherited by all classes derived from the class and all objects based on the class, unless the changed property, method, or event procedure code has been overwritten at the lower level. You can make a bug fix, a performance enhancement, or add functionality in one place at the parent class level.


REFERENCES

For a more detailed description of object-oriented programming in Visual FoxPro, please see Chapter 3 of the Visual FoxPro "Developer's Guide."

For more information about object-oriented programming, please see the following article in the Microsoft Knowledge Base:

Q129792 List of Third-Party Object-Oriented Books with ISBN

Additional query words: VFoxWin oop ood advantage

Keywords : FxprgClassoop
Version : 3.00
Platform : WINDOWS
Issue type :


Last Reviewed: August 24, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.