Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JVP's mid-tier inheritance challenge
Message
From
31/01/2000 13:38:11
 
 
To
31/01/2000 09:56:54
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00324138
Message ID:
00325166
Views:
23
>I'm curious about how you decided on this approach of "before" and "after" hooks. I've seen that done quite a bit in Visual Maxframe, but don't remember reading about it anywhere. Maybe this would be good material for an article.

To be honest, the presence of all of these methods arose from a need at one time or other. I created a bizobject class, and in deploying it in different situations, I would come across a need for a special operation that would need to occur before every delete, after every add, etc. (The add operation itsef is trivial: the object knows what alias it is adding a record to, how to get the PK, etc.- the app specific stuff is where the code needs to go)

Since my DE forms know how to interact with these business object already, creating hooked methods to put this sort of code in was a no brainer. Deploying a business object in a DE form is now as simple as dropping the object on the form, notifying the form which BizObj is the main entity, and and filling in any special processing code in these Before or After methods.

As for an article, well, it might be a while- I'm already working feverishly on several others.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform