Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and SQL at the same time
Message
From
15/01/2019 06:31:49
 
 
To
15/01/2019 03:03:53
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:
01665419
Views:
68
>>>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.

I recognize that encapsulation is an aspect of object orientation. But the general definition of encapsulation goes beyond that one use.

It also relates to any process, mechanical or otherwise, which aggregates things (data or functions) under one umbrella. This includes encapsulating utility functions into utils.prg, and close month processing functions into close_month.prg, and other such aggregations.

To say such things are not encapsulation is to use too narrow a definition, and to not recognize the root use of the word and its meaning in English.

https://www.dictionary.com/browse/encapsulation

verb (used with object), en·cap·su·lat·ed, en·cap·su·lat·ing.
1. to place in or as if in a capsule.
==> 2. to summarize or condense.

verb (used without object), en·cap·su·lat·ed, en·cap·su·lat·ing.
==> 3. to become enclosed in or as if in a capsule.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform