Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and SQL at the same time
Message
From
15/01/2019 03:03:53
 
 
To
14/01/2019 12:37:31
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:
01665417
Views:
85
>>Just want to point out that my code for splitting a procedure file into individual PRGs is now in the Thor Repository. My article about it, including the reasons I don't like procedure files, is here: http://www.tomorrowssolutionsllc.com/Articles/Splitting%20a%20Procedure%20File.PDF
>
>Having a common utils.prg allows encapsulation, a single place to search for the function you need.
>
>When trying to find your missing function use Tools -> Code References and search for "FUNCTION myFuncName" and you'll find it quickly ... if you truly don't know where it is.

Encapsulation has nothing to do how you store source code. The important aspect of encapsulation is, if you build a class, that internal values and methods are hidden to the outside. When building the class, you carefully evaluate what the actual interface will be, while you present an absolut minimum of values and methods to the calling objects.

There is a problem in VFP because IntelliSense will display also hidden and protected properties. That is probably one reason why this concept has not been implemented as much as it should have in VFP projects, at least the ones I have worked with.

If in fact you put two unrelated functions into one PRG it is not related to encapsulation, and if it would be, it is the opposite of encapsulation, because it violates the separation of concerns strategy that the encapsulation principle tries to achieve.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform