Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and SQL at the same time
Message
From
15/01/2019 13:13:20
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01664796
Message ID:
01665439
Views:
90
>>>Why use classes? Procedural code gets the job done, right?
>>
>>Classes are for when there's data that must travel with the code. No point using a class for a bunch of functions that don't share data.
>>
>>Tamar
>
>I've you're talking about VFP classes, OK. If you mean classes in general and the foundations of OOP, that's a different story and I would disagree. They can work with the implementation of interfaces. If that last statement you made were true across all of OOP arenas, then certain frameworks would really never exist. :)

Yep, classes to implement interfaces make sense, too. I've done that, but rarely enough that it didn't come to mind.


Anyway, I'm happy to modify my original comment to say that in VFP, there's no point using a class for a bunch of functions that don't share data, unless you're implementing an interface. The point I'm trying to make is that putting a bunch of functions, even related functions, into a class simply to have them together isn't, in my view, a good approach.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform