>>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