Andrew Ross MacNeill - Articles & White Papers

A collection of all my FoxPro and other developer-related writings from Conferences, published white papers and other sources. Enjoy

Name: Andrew MacNeill
Location: Kanata, Ontario, Canada

Monday, October 01, 2007

Using the VFPX Code Analyst

The Code Analyst is a tool in VFPX designed to make FoxPro application development and code maintenance easier. It combines the extensibility with a Code references-like interface, analyzing pieces of code or entire projects and identifying key areas for refactoring - similar to the Code Analysis tool in Visual Studio.

You can identify your own project rules to highlight key areas of your application that may not match your own coding standards.

A PDF version is available here

Labels: , ,

Saturday, July 07, 2007

Alerting Users in your FoxPro Application

Every application needs a way of notifying users about something. The first "something" that may come to mind is an error, which unfortunately, needs a very special kind of alert or handler. But there are lots of other events that users need to be aware of, whether you as the developer plan for them or not. In January 2007 issue of FoxPro Advisor, Mike Lewis wrote about a forced system shutdown "event" that would let administrators get all users out of the system. If you are running a process that may take a while, you might need to let users know when it has been completed. If you have a large application, there could be many events that require user notification. Perhaps worse, there may be many events that your users could have reacted to, "if only they had known" before something was happening. Some applications rely on reports to display this information – but why waste paper when you can simply alert users to an event?

Labels: ,

Sunday, July 01, 2007

Refactoring in Visual FoxPro

(this article was written prior to the Code Analyst but identifies the origins of where this tool came from)
With the sheer number of functions, commands and tools available within Visual FoxPro, it's easy to find more than one way to do the job.

So multiply the number of ways by the number of developers on your team, and it's pretty easy to see why code maintenance is pretty important.

Refactoring is about making code more useable (not changing the functionality but making it easy to understand and maintain).

This article presents 3 core concepts:
1 - Never Use Keywords for variable or field names
2 - Use the most recent functions where appropriate
3 - Encapsulate, encapsulate, encapsulate

Labels: , ,

Friday, June 01, 2007

VFPX: New Tools based on Existing Code

Tools like Code Analyst and Class BrowserX all use code from existing Visual FoxPro tools. This is possible because in 2007, Microsoft released the code for all of their xBase components with a special license. This license allows developers to create and update components and applications based on these components. It explicitly gives two rights:

Copyright – "a non-exclusive, worldwide, royalty-free copyright license to reproduce the software, prepare derivative works of the software and distribute the software or any derivative works that you create"

Patent – "a non-exclusive, worldwide, royalty-free patent license under licensed patents to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the software or derivative works of the software"

There are some limitations; primarily that you can't use the Microsoft name, must include any existing copyright notices, and that the software is provided "as-is" but the real benefit is with how it can apply to your existing applications. Want to build something similar to the Task Pane in your application? You don't need to reverse-engineer it – you can simply look in the existing code and re-use it. Thanks to the Fox Team!

Labels:

Thursday, March 01, 2007

Getting inside FoxPro Files

Here's one of the world's worst kept secrets: almost everything in FoxPro is really just a FoxPro table.

Here's an article highlighting a useful tool from WhiteLight computing about how you can get inside FoxPro's designers, projects and reports.

Labels: , ,

Wednesday, September 07, 2005

Testing Toolbox

You always test every aspect of your application--- right ?

Every application needs to get tested – either it gets done before the product is released, which is ideal or your users will do it for you, which usually turns out to be a big mistake. Even if you don't formally recognize testing in your project development cycle, you are still, in fact, testing from day one. Here are some tools and techniques that can help ease the pain of testing your Visual FoxPro application and adding it into your development process. Along the way, I'll try to answer some immediate objections to formalized testing.

Testing Visual FoxPro Applications

Tuesday, August 23, 2005

Show It and Support It : Screen Casting tools for everyone

Here's an article that was originally promised to FoxPro Advisor but they turned it down as it wasn't FoxPro-enough. Enjoy...

As many third party vendors will tell you, building the product is only half the battle. The next part, getting people to use it, can be just as tricky. This isn't just a "vendor" issue either. Almost every application being put into production in any organization faces an uphill battle towards adoption. This is where all the great features you've spent months building help to get users excited about using it. But what good are features if your users don't know about them?

It used to be that building a self-running video or demonstration of software required a great deal of expertise and money, hiring a production company who did the work in their own studio. Today, developers and trainers are building these "screencasts" themselves and in this article I'll go through several options that are available to you.

Show It and Support It : Screen Casting tools