Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A case for business objects ?
Message
From
16/08/2000 05:31:26
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00404836
Message ID:
00405383
Views:
18
Thanks a lot Larry. Sounds like session objects will fit well for the migration I am doing. Didn't know they existed.

I do have VFP 6 SP3, but session objects are not in foxhelp.chm. Found reference in vfpsp3.chm!!

Thank you.

Alex


>Hi Alex,
>I wouldn't use a VMP class (at least one of the classes that currently exist). Create a Session object in PRG code. You could define the methods you need in it. To cleanup, add CLOSE TABLES ALL to the Destroy event of the class.
>
>If you are not using VFP 6 SP3 or better then I would go with a direct subclass of FrmBase. You don't need any of the PEMs associated with data entry so FrmData and its children are out.
>
>HTH.
>
>>Hello,
>>
>>Thanks for the input. I reviewed the bizobject class of Codebook. They use a container to which they add a Dataenvironment via a DE Loader. Seems like a lot of work. Would a form that is never visible run too slowly ?
>>
>>Another question: I am using Visual MaxFrame. Should the Bizobject class be a subclass of:
>>(a) The VMP form-baseclass ;
>>(b) My intermediate form-base class that is based on xxfrmbase and that I created to use across several apps;
>>(c) My app-specific form-base class.
>>
>>In order to keep things simpler, my inclination is to keep the biz object class at the intermediate level, and base it on the VMP class. Only the biz objects exist at the app level. If it became necessary, later I can add an in between class. Does this seem right ?
>>
>>TIA,
>>
>>Alex
>>
>>
>>>Epale Alex,
>>>
>>>I think you need something a bit heavier than a bizobj, but at the same time it doesn't need all the intelligence inherent to a bizobj.
>>>
>>>From what I've learned so far, just create an object that has a private data session.
>>>
>>>Give it a couple of properties you will need: the employee's id and then others that will hold the result.
>>>
>>>Your could use the init method to read the emp_iid property, do the calculations and store the results in the other properties.
>>>
>>>Remember to close all used tables upon destroying the object.
>>>
>>>It's quick and dirty and unpolished, but I think this little recipe should be enough to get you started (or at least asking questions).
>>>
>>>ave fun!
>>>
>>>Ale
>>>
>>>
>>>>Hi,
>>>>
>>>>A routine sums several kinds of overtime hours that a worker has worked on various dates. In FPD 2.6 I would define private variables either in a form setup or at the beginning of a process and accumulated in those. Since the routine is called from different places, form properties are not a solution and it sounds like a case for a business object!!
>>>>
>>>>What can you folks in the UT tell me regarding business objects? What is the best way to create and organize them. They either need to be public, passed around or "attached" to the app object. What are the best practices ?
>>>>
>>>>TIA,
>>>>
>>>>Alex
Previous
Reply
Map
View

Click here to load this message in the networking platform