I've been slowly working through Codebook (and a bunch of Object Oriented programming books) trying to get a handle on building classes and OOP in general.
I think I undertand classes (Object Orientation in Visual FoxPro by Savannah Brentnall is a good book), but I'm still struggling with business classes and how they relate to your data and to your forms.
If I understand 3-tier programming methods, the data, business rules, and user are all separated. If I develop a non-visual class that manipulates a few tables, how do/should I access the database. What I mean is should the class include the necessary USE,SELECT,CLOSE commands to manipulate the tables? From what I've seen in Codebook, they've created a data class that you call to do the USE stuff for you, similar to the Data Environment. Is this correct? I guess that's what I'm looking for anyways - a non-visual equivalent of the Data Env.
After looking at the example program in the Codebook 3.0 book, I'm a little confused as to how "separate" the business class and the "User"/Interface actually are. It looks like they almost overlap quite a bit. Shouldn't your forms almost exclusively call Methods in your business objects (I wish I had Codebook in front of me...)? I'm not sure if this is even possible, given how much interaction is sometimes necessary between your forms and your "business logic".
I guess I'm just looking for someone to confirm (or correct) what I'm saying/thinking.
-Paul