Heya Andy .
For remote class 'management' , this was what I was exposed to way back in
1999/2000 -
Have a bunch of stuff in the backend, in that case was sql-server.
Most was table driven, and of course tables were use to store the meta data
that was sucked in to VFP via spt.
The concept was to be able to have a central repository of stuff that could
be stored in the backend, then instantiated at run time based on business
rules
or user access levels. One limitation was that there was a very
low-bandwidth link
from the servers to all of the remote locations, so the sql pull had to be
fast.
To make this really work on the VFP side - we had to come up with the concept
of a three pass approach -
1st pass was to get the list of things we wanted to instantiate
2nd pass was to get the code stored in the ms-sql table into vfp via spt
to a cursor
3rd pass was to instantiate the things we pulled down.
The backend database schema was something like this (my apologies for
being vague):
Object table
ID
ObjectName
FKID (if needed)
Object Code Table
ID
FK back to object table
VFP_Code (stored as sql memo[whatever that was])
Permissions table - if the FK for the group table didn't exist here, we
wouldn't pull the object.
ID
FK back to group table
FK back to Object Table
ModuleName
ObjectName
Group Table
ID
GroupName
so the first pass would be a spt into the ms-sql db from vfp,
checking the permissions table and the object name. This returned a cursor,
and this cursor could be multi-row, depending if there were fk's in the
object table.
The 2nd pass got the code stored in the object table, storing it in a cursor.
The third pass did a scan..endscan construct on the cursor ... something
similar to this..
--make a quick class
--add in the object and its code
similar to
Create &objectName as &VFP_Code (this isn't exact, i don't have the codebase)
--
We tried to keep it as small and granular as possible - but if you had a
larger pipe to
pull things down, you could have larger VFP_Code blocks. We were limited
to 8192 bytes
per thing because of the evaluation / macro expansion at run time
limitation of VFP 6,
but got around it with adding in via this kind o hiearchy -
Object
Object.PropertyName
Object.MethodName
Object.EventName
If an Event or Method needed more than 8192 bytes , we hit the wall.
Hope that gives you some ideas.
I've done similar setups since leaving that firm, using mySql backends.
I've also stored SPT code in a backend, sucking it down as needed based on
that model.
There's some neat-o things you can do with VFP 9 now for the instantiation
at run time, but I think you are hitting on those already.
Regards [Bill]
--
William Sanders / efGroup {rmv the DOT BOB to reply}
VFP Webhosting? You BET! -> http://efgroup.net/vfpwebhosting
Failing dotNet Project? -> http://www.dotnetconversions.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.