Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private datasession issues..
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00153491
Message ID:
00153966
Views:
27
Michiel,

Just another opinion, I'm not in favor of the wholesale converting UDFs to methods of an object. I also don't use huge procedure libraries like we had to in 2.x days. I use maybe 20 single function .prg files, I only have two .prg files that I ever SET PROC ADDITIVE to. One is for a Header class because it can't be done in the class designer and the other is a set of API conversion functions that I wanted to keep in a single source file.

If the block of code you are writing belongs in A class put it in a method. If the block of code is used by multiple places, like any of the builtin functions and it's an atomic unit of code that's not going to need to be enhanced via inheritance later on just leave it as a UDF.

>However: we are in a discussion here. One party wants to switch to a procedure file altogether. So dump the oMethod class and use one big procedure file with all the procedures which are in the oMethod class.
>
>And another party (me :-)) wants to keep the current way of working. So use the oMethod class as a subclass of the Formclass.
>
>We would like your opinion about this matter. What would be better? We know both ways work perfect. But what is good programming? Or is it just a matter of taste?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform