====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #01-04 March 30, 2001 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar * Tech Tips: MS Support Via Google V'Soske & Covill Building a Base Library Stephen Settimi Temp Files in Win 2K Dan Covill * Links: Where Can I Find...? [See the new Web Development links. DC] * Other Stuff: Recital: FoxPro on the .NET What is AFP? wOOdy Random Error Codes Microsoft Applications Center Dan Covill * Administrivia ====================================================================== CALENDAR: All meetings are in Escondido, at 6:30 pm. April 4 ------- Dan Covill will demonstrate an audit trail mechanism using XML. May 2 ----- Mike Cummings from Orange County will be speaking on HTML and the browser for reports. He'll also discuss "Excel reports for free". June 6 ------ Ken Glassman, CEO and founder of Innovative Training will talk to us about Visual FoxPro 7.0, migration issues, language changes and it's positioning (or lack of) within the .Net applications framework. The discussion will include a presentation encompassing the .Net architecture as well as VFP 7.0 specific issues. If you're at all curious about how Microsoft's latest technology suite will affect you, please attend! July 11 (The 1st Wed in July is the 4th) ------- Our own Art Bergquist will show us how to to use OLE automation from within VFP to control Outlook and Word. -------------------------------------------------------------------- Escondido meetings are at Bergelectric, 2222 Meyers Avenue. Take the Nordahl exit from Highway 78 (west of I-15). Head South. Right on Meyers Ave, first right past Mission. It's a one-story building on the right (there's no sign). ====================================================================== TIPS ====================================================================== MS SUPPORT VIA GOOGLE by Thad V'Soske and Dan Covill Support.microsoft.com has practically everything you ever wanted to know. The catch is finding it. Well, a couple of sources have given us a better answer - use Google! If you're not already using it, Google is a search engine - the best I've found. Here's how to access Microsoft with it: From Thad V'Soske 1. Go to google.com (where else?!). 2. At the entry prompt type your search words followed by "site:microsoft.com". examples: "tweakui site:microsoft.com" "component object site:www.microsoft.com" To zero-in on knowledge base articles try adding "support/kb" as in these examples: "visual studio 6.0 service pack 4 support/kb site:microsoft.com" "foxpro dbc support/kb site:microsoft.com" There are two secrets here. One, Google is a whole lot faster and more accurate than the MS engine (and its page loads faster, too). Two, using MS-specific keywords works really, really well. MS has a list of specific keywords in their documents that identify the product, subject, etc. Some of them aren't that obvious - "vstudio" for Visual Studio for example. There's a complete list in document Q242450. And the fastest way to get is in Google. search for "Q242450 kb" The 'kb' stands for Knowledge Base, and pretty much restricts the Google search to the MSKB. It's really fast! A variation from the LangaList (www.langa.com) I believe I have found an even better way to search the MS KB. Go to http://www.google.com/advanced_search . Type search words in plain English in the "all of the words" box and then: . Select "100 results" from the drop down menu . Enter the site/domain "microsoft.com". . Click on "Google Search." Thad V'Soske tvsoske@hanoverdirect.com Dan Covill dcovill@acm.org ---------------------------------------------------------------------- BUILDING A BASE LIBRARY by Stephen Settimi Here's a snippet of code I wrote that will create a one-off from the VFP visual class library. I use it when embarking on a new project and wanting a clean slate from which to subclass. The _base.vcx supplied by MS has a lot of gobbly-gook code, while well-meant, will never be used in most apps as written today. PROCEDURE BUILDBASE Lparameters cPrefix If VARTYPE(cPrefix)="L" cPrefix="_" Endif cClassList="ActiveDoc| CheckBox | ComboBox | CommandButton "+; "| CommandGroup | Container |Control | Custom "+; "| EditBox | Form | FormSet | Grid | Image | Label "+; "| Line | ListBox "+; "| Container| OptionButton | OptionGroup | Page | PageFrame "+; "| ProjectHook | Shape | Spinner | TextBox | Timer | ToolBar" FOR i =1 to GETWORDCOUNT(cClassList,"|") T=ALLTRIM(GETWORDNUM(cClassList,i,"|")) o=CREATEOBJECT(t) o.saveasclass(cPrefix+"base",cPrefix+t) ENDFOR COMPILE classlib (cPrefix + "_base") ENDPROC ____________________________ Stephen Settimi www.settimi.org ---------------------------------------------------------------------- TEMPFILES IN WINDOWS 2000 by Dan Covill If you're like me, you generally include a config.fpw in your app with the line: TMPFILES = C:\TEMP (or someplace) Until you do that, the .TMP files accumulate in the program directory by default. Well, they used to, but not in Windows 2000! I became suspicious after a month of development on my new Win2K machine. Even with the usual code crashes, there were no .TMP files hanging around. So I went looking for them, and found 27 MB worth lurking in a directory with a really disgusting pathname. C:\WINNT\Documents and Settings\Dan Covill\Local Settings\Temp It seems that Windows 2000 enforced some new standards for default user data locations, which VFP follows. When you install VFP on Windows 2000, the default location for temp files is one I gave (Assuming, of course, that your name is Dan Covill). You might want to go to Tools | Options | File Locations and change that to someplace you can find and clean up. Dan Covill dcovill@acm.org ====================================================================== LINKS ====================================================================== This is a (semi) permanent list of places to look for technical help when you get blind-sided by the latest urgent requirement. We don't give specific URLs for MSDN articles because (a) they're too long and (b) they change too often! ------------------------------- MSDN ON LINE: There's a ton of stuff here, look at the Magazines tab, and read some of the regular columns. MSDN Library Look in Technical Articles | Visual Studio | Visual FoxPro 3-Tier Apps: MSDN Library: "Building Three-Tier Client/Server Applications with Visual FoxPro" ADO MSDN Library: ADO Jumpstart for Microsoft Visual FoxPro Developers John V. Petersen, April 1999 DNA (Distributed interNet Architecture): MSDN On-line: "Top Windows DNA Performance Mistakes and How to Prevent Them" MTS: Microsoft Transaction Server MSDN Library: "Microsoft Transaction Server for Visual FoxPro Developers" ODBC: MSDN Library: "Using Visual FoxPro to Access Remote Data" ODBC drivers are part of MDAC - Microsoft Data Access Components - and are available for download at: "www.microsoft.com/data" VS Installer: MSDN Library: a. "Using Visual Studio Installer for VFP 6.0 Applications" b. "VFP 6.0 and VS Installer Tutorial" VFP General: This is the most complete set of FoxPro links you're likely to find: http://www.cetus-links.org/oo_visual_foxpro.html WEB Development: These products all work well with VFP. WestWind www.west-wind.com FoxWeb www.foxweb.com AFP www.afpweb.com and www.afpages.com X-WORKS www.x-works.com Windows General XML - What's New in XML for Microsoft Windows 2000 See also OLE DB drivers for XML in MDAC 2.6 at "microsoft.com/data" [Contributions solicited. DC] ====================================================================== OTHER STUFF ====================================================================== FOXPRO ON THE .NET [The following is a press release, but still interesting. DC] Danvers (MA), March 17, 2001: Recital Corporation has today announced Mirage, its exciting new technology that enables legacy Recital, FoxPRO, and FoxBASE character mode applications to run in industry standard web browsers without any code changes. This provides the ability for existing Recital, FoxPRO, and FoxBASE character mode applications to be Internet-Enabled and be hosted by ASPs (Application Service Providers) with ease. Recital Mirage is a powerful client/server product that comprises an all-Java wafer thin client driver (less than 75kb download) with a powerful application server. The application server is available for Windows NT, Windows 2000, Linux, OpenVMS and many Unix platforms. The Recital Mirage client driver offloads all data entry into the web browser, but cooperates closely with the server to perform data validation etc. Recital Mirage not only extends the life of your existing applications, but significantly enhances it. Barry Mavin, CEO of Recital Corporation announced, "Today’s businesses are demanding Weboriented and a Windows UI for their applications so they can participate in the exploding eCommerce market. They want it now! Perhaps the biggest benefit to using Recital Mirage is that you can get it now!." A live demo of Mirage is available at http://www.recital.com Recital Mirage .NET will be available towards the end of 2001." [Note that he said "character based". That means DOS, not VFP, at least for starters. DC] ---------------------------------------------------------------------- WHAT IS AFP? by "wOOdy" [AFP (Active FoxPro Pages) is an ASP look-alike that uses VFP instead of VB script to do the work. But how does it work? This description was posted on ProFox by the president of ProLib, the German developers of AFP.] Some Webservers (MS IIS, Apache and some others) have a programming interface, which is somewhat standarized as the ISAPI definition. You can plug a DLL into that and then get all user requests as well as the answers of the webserver routed through your DLL. If a user navigates to a webpage, he basically sends an request to the webserver to send him that file. If that's a normal HTML file, we just let it go by, but if it has an AFP extension, we catch the IIS answer, and go in between. We parse the file into the real HTML stuff and the embedded code fragments and rebuild it in such a way, that we can run (and optionally compile) a real program out of it, which then runs on the server and generates the original HTML output, mixed with the output of your VFP code. That result is now feed back into the IIS, which then sends it to the user. All this is done on the fly, each time someone requests a file. And here is where VFP really shines: String processing is one of VFPs favourite things. Also the native dbf processing speeds up queries extremely, in contrast to ASP. And, of course you don't have to put all your VFP code into the HTML file. This is just one way to code. An old saying goes, that "with VFP you never only have one option (or correct way of doing things) but always at least three of them". Same here: If you prefer to do inline coding: go for it. If you want encapsulation: Write your code in classlibraries and instantiate some objects and just call your methods in the HTML file. Since you have the fullblown VFP engine with all of the hundreds of commands and functions integrated as your Webserver extension, you have much more fun than with simple ASP / CGI / PERL or whatever. And of course also more risk... But as they say: No Risk - No Fun ! Servus wOOdy (Juergen Wondzinski) [For more info, look at or the US distributor at . AFP costs $499, and you can download a working demo for free. DC] ---------------------------------------------------------------------- RANDOM ERRORCODES [I picked these up somewhere in a list of random messages some wags generated as a substitute for everybody's favorite Error 404. DC] 201 The request has been fulfilled and resulted in the creation of a new resource 202 The request has been accepted for processing , but the processing has not been completed 300 The server couldn't decide what to return. 301 The requested resource has been assigned to a new permanent URI, and any future references to this resource should be done using one of the returned URIs. 304 The requested resource has not been modified. 307 The redirected request keeps the same verb. HTTP/1.1 behavior. 403 The server understood the request, but is refusing to fulfill it. 406 No responses acceptable to the client were found. 413 The server is refusing to process a request because the request entity is larger than the server is willing to process. 414 The server is refusing to service the request because the request URI is longer than the server is willing to interpret. 503 The service is temporarily overloaded. ---------------------------------------------------------------------- MICROSOFT APPLICATIONS CENTER by Dan Covill Downloaded and read an "Evaluation Guide" for the Microsoft Application Center 2000, which is kind of the back end to .NET. and is apparently about to be released. I wouldn't necessarily recommend it as a cure for insomnia, but there are some interesting insights into the bigger .NET picture. Here's a list of .NET Enterprise Servers (i.e., "BackOffice software packages that run on NT server): Microsoft BizTalk(tm) Server 2000 XML data interchange Microsoft Commerce Server 2000 "Electronic store infrastructure for e-commerce" Microsoft Exchange 2000 Server Messaging and collaboration infrastructure Microsoft Host Integration Server 2000 "Connecting host-based transactions with new applications" Microsoft Internet Search and Acceleration Server 2000 "Scalable enterprise firewall and Web caching" Microsoft Mobile Information 2001 Server "Bring the corporate intranet to mobile devices" Microsoft SQL Server 2000 "A complete database solution" Presumably the target market has some idea of what the marketspeak means - we technical types can only guess. The names are fascinating; some have the '2000' before 'Server' while most have it after, and there's one that says '2001' instead of '2000'. Come to think of it, it's a bit late to be releasing '2000' anything. The big action here is "simplifying" the management of server clusters. Server clusters are the Microsoft answer to: a. Eliminating "single points of failure" b. Faster time to market with applications c. Software scaling and load balancing. I'm not knocking it, these are probably real problems for very large operations. (People who worry about managing their server clusters don't tend to move in my social circle, so I have little direct knowledge of their problems.) Is there a picture building here? For me, it is simply that this whole thing is aimed at the big boys - "enterprise" shops with huge WANs and particularly high-traffic web operations. Businesses with only five servers need not apply. If you have to ask what it costs, you can't afford it. And I think that goes for the rest of .NET. If you have less than ten people in your "IT department", it will all be irrelevant. At least for the next couple of years, by which time we'll know whether it has taken over the world or not. My money is on not. The paper is 37 pages, you can download the Word file from http://www.netenterpriseservers.com/downloads/ application_center_2000_reviewers_guide.doc (yes, the link wraps) Look at the bigger Application Center picture at: www.microsoft.com/applicationcenter --------------------------Administrivia------------------------------- This newsletter is a service to all FoxPro developers, provided without charge by the FoxPro Developers Network of San Diego (FPDN). Anyone may subscribe (or unsubscribe) at our web site . The link is on the home page. The Resources button on the website will take you to the back issues of the newsletter. The editor (Dan Covill) is solely responsible for the content. E-mail him with YOUR tips, comments, or complaints. Editor: Dan Covill 858-272-2448 dcovill@acm.org Board of Directors: Eric Lendvai - President 760-734-4929 eric@elsoftware.com Art Bergquist - Vice Pres 760-740-0428 abergquis@cs.com Claude Nikula - Secretary 619-615-6318 nikula@worldnet.att.net Barbara Peisch - Treasurer 760-729-9607 barbara@peisch.com Dan Covill - Director 858-272-2448 dcovill@acm.org Thad V'Soske - Director 619-544-9900 tvsoske@hanoverdirect.com ----------------------------------------------------------------------