General information
Category:
Object Oriented Programming
>hi,
>how should i classify my classes, base on control type (all base form in a library, and base control in another) or functionality (all control needed for search form)?
>
>Thank you
If you're doing a regular database app (everything in an EXE), then the following classlib setup below works for us:
1. Application classes (application object, form manager, application classes, toolbar, etc) -- abstract classes that have one instance per application.
2. Form classes (modal, non-modal, and other varieties) -- abstract classes used multiple times in an app.
3. General form control classes (subclassed from VFP classes, as well as home grown classes that fit our interface style) -- abstract classes.
4. Specialized form controls and other classes -- concrete classes that are used in specific modules.
5. Form classes that will be instantiated in the application -- this class may be broken into smaller classes which represent an application module.
Considerations include:
Packaging the final product. COM components may dictate packaging.
Using the classes in a development environment: form controls are accessed a great deal so it's convenient to have the most commonly used controls in one classlib.
Ability to allow multiple developers to access classes easily. Sometimes smaller granularity in the class libraries particularly with application-level objects like forms, makes it a lot easier for one developer to check out, for example, the AP forms, and another developer to check out the AR forms, rather than having all forms in one classlib.
Jay
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only