Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What base class to use in VFP 9 for biz?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01024176
Message ID:
01024296
Views:
20
David,

Thank you for giving an example of a composite object. Sounds very sophisticated. In my case, the object will somewhat simple. For example, "Equipment Object", "Work Order Object", etc.

>Dmitry,
>
>Let me give you a more concrete example. I worked on several import processes and they basically all do the same thing migrate data from some file(s) to some table(s). The tasks got split apart into these classes:
>
>cImport - overall import controller class.
>cParse - overall controller of the file parsing process.
>cParseFile - an abstract class that knows how to read/verify a file.
>cTable - an abstract class that pushes data to the data store.
>
>Several cParseFile subclasses got created each one specific to the needs of a particular file type for example CSV, SDF, XLS, DBF. cTable was subclassed for each table.
>
>To build a particular import process, I subclass cParse. Into this I drop one of the cParseFile subclasses for each file being processed. Then these file instances got their specific cursor structures implemented, and the cParse.Import method gets written to move the file fields to the table objects.
>
>A cImport subclass is created where I just have to set a few properties. Into it is dropped the cParse subclass and one of the cTable subclasses. The cImport class method code has all the wiring to know how to hook it's contained items together.
>
>The cImport subclass is instantiated inside of a Private DS form subclass that handles the file pick process for attended mode imports as well as provide progress feedback while the import is running.
>
>This is a good example I think of BO's that need to all be operating inside the same DS as well as designtime containership. When I open the cParse subclass I can see instantly how many and what sort of files are being processed because they each sitting there in the container.
>
>>Seriously though. Creating composite object at design time is not a priority for me (honestly I don't even understand the purpose of the composite object). Therefore container does not seem to be the right fit for my needs. And I don't mind putting extra time/work to pass data across session boundary. But to work with session class is PITA because you have to do it all in .PRG.
>>Custom class is nice but lacking the DataSession property to isolate the data. I don't have VFP 9 yet, just ordered it yesterday, but I was hoping that by now (ver 9) VFPT would have a class that have benefits of all three suggested, specifically designed for business classes.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform