Where to Modify Classes

So, you decide you need to modify the blueprint, or class, of an object in your VPM Enterprise application. How do you make your modifications? Well, you have some choices and you need to understand the consequences of your choice. Here are some guidelines to help you make a choice.

Guidelines for Choosing Class to Modify

You can modify a class in its VPM, DEV or PRO level class library. Whether you modify a VPM, DEV or PRO level class depends upon:

1.   All Apps or One: Whether you want the modification to apply to all your applications or only a specific application.

·       If you want the modification to apply to all applications, modify the class in the VPM or DEV level class library.

·       If you want the modification to apply to just one application, modify the class in the application’s PRO-level class library.

2.   All Subclasses or One Class: Whether you want to modify just one class or have your modification apply to a class and all its subclasses automatically.

·       If you want your modification to apply to a class and all its subclasses automatically, modify the class in its VPM-level class library.

·       If you want to modify just one class, modify the class in its DEV-level or PRO-level class library. If you want subclasses of the class to reflect your modification, you will need to directly modify the subclasses in the class library level you chose.

3.   Update Protection: Whether you want to minimize the chance that you will need to reapply your modification after a VPME update.

·       If you modify a class in a VPM-level class library, you will almost certainly have to reapply your modification when a VPME update is released. VPME updates provide new VPM-level class libraries.

·       If you modify a class in a DEV or PRO level class library, the chances are minimal that you will have to reapply your modification when a VPME update is released. Normally, VPME updates do not include new DEV and PRO level class libraries. If it is necessary to replace a DEV or PRO level class library in a VPME update, you will be notified of the replacement and can reapply modifications you have made in the replaced class library.

Caution: If you choose to modify PRO-level classes, be sure to modify the PRO-level class libraries in your project’s home directory. Do not modify the PRO-level class libraries in the VPME New Project directory. The PRO-level class libraries in the New Project directory are templates used by VPME to create new projects.

Subclass a Class

Instead of directly modifying a VPME, DEV or PRO level class, you can subclass a VPME, DEV or PRO level class and make your changes to the subclass. You can even create your own VPME, DEV or PRO level class libraries to hold your subclasses. You would create your own subclass if you need to make extensive changes that you do not want to affect a VPME-provided class.

More:

Opening Your Class Libraries At Application Startup