I've been programming computers for nearly 25 years. I've used a number of languages and a lot of different computers. But one thing has remained the same: There always seem to be parts of a problem that just don't fit the language I'm using.
In school, they usually gave us problems designed for the language being taught. But the real world isn't that friendly. So, like most of you, I've written my share of code forcing a language to handle a task it wasn't designed for.
Visual FoxPro and its predecessors (FoxPro and FoxBASE+) have always been open to this kind of programming. Over the years, the language has grown to include a variety of sub-languages (such as the low-level file functions and textmerge) to make non-data tasks easier. Nonetheless, the people who created FoxPro have been amazed more than once by what others are doing with it. Those who saw the FoxPro 2.x version of JFast, Brian Jones' group's incredible logistics application for the U.S. Department of Defense, can understand why. (The more amazing VFP version of JFast is described in the June 1998 issue.)
Increasingly, the things our users want are complex enough that twisting VFP into a pretzel to do them natively doesn't make sense. Fortunately, the nature of PC programming has been changing as fast as our users' wishes.
Today, instead of having to write everything in a single language, it's more effective to build applications that use a variety of components written in assorted languages. It once made sense to write a simple word processor in FoxPro, but it's now so easy to call on Word or another word processor that it's almost malpractice to write it yourself.
I've talked about COM in this space before. (See the December 1998 and January 1999 issues.) We've also had several articles that covered various aspects of COM. In fact, the monthly ActiveX Control Showcase highlights one or more COM tools -- ActiveX controls are one aspect of COM.
In this issue, we have a pair of articles that get you started with what I consider the most powerful aspect of COM. Automation lets you "drive" one application from another. Our cover stories use VFP to control Microsoft Office applications, but many other applications let you put VFP in the driver's seat as well. Menachem Bazian's article explains what COM is and how it works, then concludes with a simple example. Dan Freeman discusses how to get started using automation, and how to find out what you need to know to work with an automation server.
The adage says, "When all you have is a hammer, everything looks like a nail." COM, especially automation, gives you a screwdriver, a wrench, a saw, and more, so you can always use the right tool for the job.
COMPONENT ADVISOR
Because component-based development is the future, and it extends far beyond Visual FoxPro, we're launching a resource of technical and management guidance: COMPONENT ADVISOR Magazine. Joining our team as a Technical Editor is Sam Patterson, CEO of ComponentSource, Inc. (http://www.ComponentSource.com/. As experts in component development, ComponentSource's research and experience is helping us create the most useful, practical, and technically strong magazine and conference on component development. Sam has developed components, written technical articles, and spoken at conferences on component development since 1991. Get info on COMPONENT ADVISOR Magazine, and upcoming ADVISOR DEVCONs on component development, at http://www.Advisor.com/Component.
FoxPro Y2K suit dismissed
In the April 1999 issue, I told you about a class action suit filed against Microsoft regarding FoxPro's handling of the Year 2000. The suit, from a Chicago developer, has been dismissed with prejudice by a federal court in Illinois. This means that, while the decision can be appealed, the suit cannot be refiled. The key point is that FoxPro works as documented. To read the court's full decision, see http://www.microsoft.com/presspass/press/1999/mar99/y2klawsuitpr.htm.
Incidentally, there was an error in my April column. Reader Mark Winston pointed out to me that the dBASE II did not have date fields. They were added in dBASE III.
VFP is hot!
After years of bad publicity for FoxPro, lately almost every time I hear of a mention of VFP in the press, the news is good. Many computer trade magazines have mentioned VFP recently, talking about it as a tool for building middle-tier components, Microsoft's designated role for the product. It's great to see the rest of the world notice what we've known for years -- VFP has a terrific data engine.
Along with the good publicity, several people are working on revitalizing local user groups. As founders retired from leadership, a number of groups dwindled. But now, new leaders are bringing them back to life. If you'd like to talk to your colleagues face-to-face on a regular basis, find out whether there's a group in your area; if not, consider starting or restarting one.