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.
You can read the wiki pages and download the wwBusinessPro library from the BitBucket repository.
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.
1. Before you try to jump in, take time to read each article listed below.
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.
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.
If the offer to send your wwBusinessPro class extension to Rick’s wwBusiness class still stands, I’d be very interested in getting a copy. I’m in the design phase of adding a SQL Server option to a fairly significant application that I think could benefit from your extension.