Updated 02/01/2010 1:26 pm
I’ve written an extension library on top of the West Wind wwBusiness classes for object oriented data access in Visual FoxPro, which I’ve named wwBusinessPro. In this blog series I will explain some of the basics about the base West Wind wwBusiness data access library and my extension library wwBusinessPro, which is built on top of it.
I’ve prepared several articles explaining some basics of the main wwBusiness library from West-Wind Technologies and how my wwBusinessPro extension library adds support for String lookups and Parent-Child data models for your applications.
It’s not hard to get started… I recommend this strategy:
1. Before you try to jump in, take time to read each article listed below.
2. When you are ready to start, follow the instructions in the post Setting up wwBusinessPro.vcx to work with wwBusiness.vcx
3. Now create a new class library for your Business Objects and add a Parent BO class inherited from wwBusProParent, and one or more Child BO classes (ones that are related to the Parent you created) which inherit from the wwBusProItemList class.
4. Next, add data rows to the wwBusinessObjects.dbf table to setup your Parent and Child business objects. (see wiki page for screenshot). There will be one row for the Parent, and a row for each Child that relates to the Parent.
Now you’re ready to go… With a Parent and a Child BO properly configured, you can actually drive the whole thing from the Command Window, which is a good way to play around with it and see it work. See this code sample for a typical code snippet that is used to work with BO’s. After a little testing you’ll be ready to create (or modify) your forms to use the Parent/Child BO pair. It’s not all that hard, you just need a simple get-started case to help you see it all come together.
Intro and overview articles:
Specific Steps to use wwBusinessPro BOs in your code and forms:
Step 2 – Creating and using your first Parent Business Object (wwBusProParent class)
Other wwBusiness resources:
Main wwBusiness Help File from West Wind (click Class Reference –> Class wwBusiness)
wwBusinessPro is a free open-source project, but you’ll need to purchase your own license for the main wwBusiness library from West Wind. It is included as part of the West Wind Web Connection package and also included in the West Wind Client Tools package at the West Wind web site.
If you have any questions or need specific help please comment below.