KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q136768: Benefits of Object-Oriented Coding

Article: Q136768
Product(s): Microsoft FoxPro
Version(s): 3.00
Operating System(s): 
Keyword(s): 
Last Modified: 25-AUG-1999

-------------------------------------------------------------------------------
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          :  
Technology        : kbVFPsearch kbAudDeveloper kbVFP300
Version           : 3.00

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.