Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
General framework and application framework
Message
From
30/09/1998 17:13:24
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142159
Message ID:
00142580
Views:
25
Hi Evan,

I am also deep into developing a framework and dealing with these same issues. What I am learning is that the initial design of the framework is critical with respect to maintaining it's generic quality and promoting reusability.

I try to keep the neccessity for subclassing to a minimum (hate complex class hierarchies) by means of hook mechanisms. This type of strategy allows me to sublass my primary framework classes for each project (e.g. Application, ToolManager, EnvironmentManager, DataManager, SecurityManager, etc.), but also allows me to develop and utilize other classes which are more specialized in nature and do not neccessarily have to be subclassed.

I know that this may sound somewhat vague. The best analogy I can come up with is an electrical outlet (a framework class) - you can plug-in different devices (lamps, stereos, TVs) all of which have different behaviors. Additional speakers and a VCR can then be plugged into the stereo and so on. Similar speakers can be subclassed :)

-Jeff

>What is a good strategy for maintaining a generic framework and then using/modifying this into a framework that is used for each project I work on?
>
>In my mind, I would like to have general, generic framework which is not tailored to any given project, but contains the foundation for a project. This would have the generic toolbars, form control hierarchies and the rest. I would tweak this over time.
>
>For each application I would then copy or subclass this framework. The framework would be modified to (or subclassed) and tailored to the needs of the specific application requirements.
>
>How do I do this? I have some ideas, but none seems perfect.
>
>1. Have a main framework. Then physically copy the framework into each new projects directory as I start them.
>Pros: Simple.
>Cons: Any tweaks to the generic framework will not ripple through the application specific frameworks.
>
>2. Have a main framework. Then reference it from each project. Subclass the generic framework classes into an application set of classes.
>Pros: Changes to generic framework are rippled through to the application frameworks.
>Cons: The application framework is flat. Changing the behaviour of all types of buttons requires changes to each subclass of each button type (for example).
>
>Is there a better way to do this?
- Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform