Hi Cetin
An scx file is a natural and physical collection of things contained in that screen. A vcx for a compound object is also a physical collection of things contained in that object.
I object ;) to a vcx that contains unrelated things. I agree that there must be a class library, but it is often being used improperly, IMO. For example, putting all date calculation objects into the same vcx as the business objects makes no sense. Before you arbitrarily group things together, I strongly advise you not group them at all.
For that matter, people are also doing things like putting a weekdays function into a payroll screen. Would you instantiate the payroll screen just to get that weekdays function? The weekdays function is not dependant on the payroll screen. Opting to keep the weekdays function outside of the payroll screen leaves that code available for every possible other purpose.
If you put all baseclasses in a single vcx, those classes are all automatically included in your exe. I would put all baseclasses one per vcx, except that I use MaxFrame. Things I subclass from it do go in one class per vcx. It is very liberating! I always remember the class I want and never have to remember where it's hidden.
I would like for there to be a way to organize functions and classes logically/virtually, but not a physical organization.
>:) Why is there a scx file but not ccx file (single object)?
>IMHO Library is not a misconception and serves grouping classes. For the simpliest example, do you keep your baseclasses one per a vcx - somethign like myLabel of myLabel.vcx?
>Cetin
>
>>I think Library is a misconception or at least abused. Granularity is far better than arbitrarily collecting stuff in a set of class libraries. Why is there a class library file, but no class file?
>>
>>
>>
>>>I don't agree. A vcx stands for a classLIBRARY. If I'd just keep my classes in a LIBRARY down to one then LIBRARY is a misconception??? prg is no different in that matter.
>>>Cetin
>>>
>>>>Whichever way you go, keep the number of classes in each prg or vcx down to one. See
http://fox.wikis.com/wc.dll?Wiki~PRGvsVCX~VFP and
http://fox.wikis.com/wc.dll?Wiki~VFPSetProcedure~VFP>>>>
>>>>>Hi All,
>>>>>
>>>>>I and a friend are having a discussion on how to best create and maintain classes. He suggested that we programmatically code our classes. I, however, am very comfortable designing/coding classes visually - that is, using the Visual Class Designer.
>>>>>
>>>>>Although one can very well convert a VCX based class (or a Form even) to a PRG class via Class Browser/View Code, the issue of performance and best practices comes to mind.
>>>>>
>>>>>Which executes faster? Is coding classes programatically more popular? Or better practice?
>>>>>
>>>>>Many thanks to anyone who shares his/her insights!
>>>>>
>>>>>Dennis